Nginx PHP虚拟主机配置实例:

  1 server {
  2         listen  80;
  3         server_name     centos.nginx.com;
  4         gzip on;
  5
  6         location / {
  7                 root html/centos;
  8                 index index.php index.html;
  9         }
 10
 11         access_log logs/centos.nginx.com.log;
 12
 13         error_page      404  /404.html;
 14         error_page      500 502 503 504 /50x.html;
 15
 16         location ~ \.php$ {
 17                 root html/centos;
 18                 fastcgi_pass 127.0.0.1:9000;
 19                 fastcgi_index index.php;
 20                 fastcgi_intercept_errors on;
 21                 fastcgi_param SCRIPT_FILENAME                                   $document_root$fastcgi_script_name;
 22                 include fastcgi_params;
 23         }
 24
 25 }

2014-1-22 12:12:48 通过网页

更换一道题!