1、添加server
server {
listen 8001;
server_name localhost;
root /home/ebayerp;
location / {
index index.html index.htm index.php;
}
location ~ .php$ {
# root "/home/ebayerp";
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
# fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
access_log /home/wwwlogs/ebayerp-access.log;
}
重启nginx服务,效果如下

如果访问不了,查看

设置关闭:

即可访问。
最后
以上就是奋斗世界最近收集整理的关于nginx中,配置ip多端口访问的全部内容,更多相关nginx中内容请搜索靠谱客的其他文章。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复