码迷,mamicode.com
首页 > 其他好文 > 详细

nginx虚拟主机配置

时间:2018-05-18 14:05:20      阅读:141      评论:0      收藏:0      [点我收藏+]

标签:files   err   lis   index   location   style   clu   pre   cat   

 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虚拟主机配置

标签:files   err   lis   index   location   style   clu   pre   cat   

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

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!