您的位置:首页 > 运维架构 > Nginx

配置nginx 文件,使用二级域名访问

2017-07-17 22:44 162 查看
@到vhost 目录下新建文件shop.c.cn.conf

server
{
listen   80;
server_name  shop.c.cn;
root       /home/wwwroot/project/shop/public;
index  index.php index.html index.htm;

location ~ .*\.php$
{
try_files $uri $uri/ /index.php$is_args$query_string;
root  /home/wwwroot/project/shop/public;
fastcgi_pass  127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: