首页 > 其他 > 详细

nginx服务器配置

时间:2015-10-23 13:35:32      阅读:173      评论:0      收藏:0      [点我收藏+]

server
{
  listen 80;
  server_name app.yaoyao.org;
  index index.shtml index.html index.htm index.php;
  root /data/wwwroot/app.yaoyao.org;

  # rewrite "^/(\w+)/list_(\d+)\.html$" /$1.php?page=$2;
  # rewrite "^/(\w+)/index.html$" /$1.php;

  # location ~ .*\.(php|php5)?$
  location ~ ^(.+\.php)(.*)$
  {
    fastcgi_pass 127.0.0.1:9000;
    fastcgi_index index.php;
    include fastcgi.conf;
  }
  location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
  {
    expires 30d;
    access_log off;
  }
  location ~ .*\.(js|css)?$
  {
    expires 7d;
    access_log off;
  }
  location /docs/
  {
    deny all;
  }
  access_log /home/wwwlogs/app.yaoyao.org.log access;
}

nginx服务器配置

原文:http://www.cnblogs.com/hiwen/p/4904116.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!