码迷,mamicode.com
首页 > 其他好文 > 详细

nginx服务器配置

时间:2015-10-23 13:36:10      阅读:225      评论: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
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!