Nginx反向代理PHP

 

 

server {
  listen 80;
  server_name zg.dbschenker-atoms.com;
  access_log /data/web_log/nginx_log/zg_db_access.log moss;
  error_log /data/web_log/nginx_log/zg_db_error.log;

location / {
  root /data/web_data/web/app/zg_cat/www/;
  index index.php index.html index.htm;
}
location ~ \.php$ {
  root /data/web_data/web/app/zg_cat/www/;
  fastcgi_pass 127.0.0.1:9000;
  fastcgi_index index.html;
  fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  fastcgi_param SCRIPT_NAME $fastcgi_script_name;
  include fastcgi_params;
 }
location /php-fpm_status {
  fastcgi_pass 127.0.0.1:9000;
  fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  fastcgi_param SCRIPT_NAME $fastcgi_script_name;
  include fastcgi_params;
  }
}

 

posted @ 2016-10-28 21:54  为生活而努力  阅读(191)  评论(0编辑  收藏  举报