首页 > 其他 > 详细

nginx虚拟主机配置

时间:2018-05-18 12:14:23      阅读:149      评论:0      收藏:0      [点我收藏+]
 1 server {
 2         listen 80;
 3         server_name real.zhudai.com;
 4         access_log /var/log/nginx/real.zhudai.com-access.log;
 5         error_log /var/log/nginx/real.zhudai.com-error.log;
 6         root                    /var/www/www.zhudai.com/www;
 7         index                   index.php index.html index.htm;
 8         location / {
 9                 try_files $uri $uri/ /index.php$is_args$args;
10         }
11         location ~ \.php$ {
12                 include                         fastcgi_params;
13                 fastcgi_param SCRIPT_FILENAME   $document_root$fastcgi_script_name;
14                 fastcgi_pass                    127.0.0.1:9000;
15                 try_files $uri = 404;
16         }
17         location ~ /\.(ht|svn|git) {
18                 #deny all;
19         }
20 }

 

nginx虚拟主机配置

原文:https://www.cnblogs.com/dawuge/p/9055499.html

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