nginx部署多个域名问题

lkjhg432 lkjhg432 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区
小弟php初学者。
最近在nginx部署多个域名问题上纠结了很久。
nginx装在Linux虚拟机上面,想在win7的真机上输入域名显示在Linux上配置的网页。
在nginx的配置是这样的:
server {
listen 80;
server_name www.abuwo.com;
root /storage/www/abc.com;
error_page 500 502 503 504 /50x.html;
access_log logs/abc.com.access.log;
location = /50x.html {
root html;
}

location / {
if (!-e $request_filename) {
rewrite ^/(.*)$ /index.php?/$1;
}
}

location ~*\.php$ {
try_files $uri = 404;
fastcgi_pass phpfpm;
fastcgi_index index.php;
include fastcgi.conf;
}
}
...全文

相关推荐

评论 17
收藏 已收藏
分享
返回顶部
lkjhg432
PHP 20,393 成员 19,654 内容