lnmp 反向代理如何配置???
请问nginx反向代理其他网站如何配置,总是提示404server
{
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
indexindex.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 编辑 ] https://www.vpser.net 上搜索反向代理 就有教程
弄个反代你加上include enable-php.conf;干啥
页:
[1]