首页 > Web开发 > 详细

nginx代理php设置

时间:2020-01-29 15:52:45      阅读:72      评论:0      收藏:0      [点我收藏+]

server {
  listen 80;
  #listen [::]:80 default_server;

  # server_name www.xxx.com;
  root /opt/www.xxx.com;
  index index.php index.html;

  # Load configuration files for the default server block.
  include /etc/nginx/default.d/*.conf;

  location / {
    try_files $uri $uri/ /index.php?q=$uri&$args;
  }

  location ~ \.php$ {
    fastcgi_pass 127.0.0.1:9000;
    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
    include fastcgi_params;
  }

  error_page 404 /404.html;
    location = /40x.html {
  }

  error_page 500 502 503 504 /50x.html;
    location = /50x.html {
  }
}

nginx代理php设置

原文:https://www.cnblogs.com/kiancyc/p/12240377.html

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