php get 非80端口,Linux 使用非 80 端口配置失效?

nginx 配置使用81端口访问,不能正确定位 index.html ,需要手动输入?

server {

listen 81;

root /www/web/xxxx/public_html;

server_name xxxx.com;

index index.html index.php index.htm;

error_page 400 /errpage/400.html;

error_page 403 /errpage/403.html;

error_page 404 /errpage/404.html;

error_page 503 /errpage/503.html;

location ~ \.php$ {

proxy_pass http://127.0.0.1:88;

include naproxy.conf;

}

location ~ /\.ht {

deny all;

}

location / {

try_files $uri @apache;

}

location @apache {

proxy_pass http://127.0.0.1:88;

include naproxy.conf;

}

}

2bfc6e55248c359253d74e539d9359f3.png

为何如此奇怪?经过测试这个配置是成功的,输入完整地址时

ec4bcd714307886bf13803174f48842d.png

目录文件如下

e7f3bf6b4b8875431b0fece01f7ccd89.png

无法解析 php 文件。。。

c02ba7097907e558d7091ccce99aeee1.png

e022037bc26dd2794716a4b2cce0be47.png

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值