nginx域名重定向

2019-01-14  本文已影响0人  我的楼兰0909

server {
listen 80;
root /www/web/demo;
server_name sss.com www.sss.com;
if (host != 'www.sss.com' ) { rewrite ^/(.*) http://www.sss.com/1 permanent; } 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 {
internal;
proxy_pass http://127.0.0.1:88;
include naproxy.conf;
}
}

上一篇 下一篇

猜你喜欢

热点阅读