nginx服务器配置

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;
}

posted @ 2015-10-23 12:16  hiwen  阅读(204)  评论(0编辑  收藏  举报