VPS侦探论坛
标题:
lnmp 反向代理如何配置???
[打印本页]
作者:
bobofan1995
时间:
2018-4-6 12:24
标题:
lnmp 反向代理如何配置???
请问nginx反向代理其他网站如何配置,总是提示404
[attach]4988[/attach]
server
{
listen 80;
#listen [::]:80;
server_name abc.com www.abc.com;
index index.html index.htm index.php default.html default.htm default.php;
#root /home/wwwroot/abc.com;
include none.conf;
#error_page 404 /404.html;
# Deny access to PHP files in specific directory
#location ~ /(wp-content|uploads|wp-includes|images)/.*\.php$ { deny all; }
include enable-php.conf;
location / {
proxy_pass http://example.com/;#要代理的url
index index.html index.htm;
}
#location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
#{
# expires 30d;
#}
#location ~ .*\.(js|css)?$
#{
# expires 12h;
#}
#location ~ /.well-known {
# allow all;
#}
#location ~ /\.
#{
# deny all;
#}
access_log off;
}
复制代码
[
本帖最后由 bobofan1995 于 2018-4-6 12:50 编辑
]
作者:
licess
时间:
2018-4-6 13:44
https://www.vpser.net
上搜索反向代理 就有教程
弄个反代你加上include enable-php.conf;干啥
欢迎光临 VPS侦探论坛 (https://bbs.lnmp.com/)
Powered by Discuz! X3.4