server {
listen 80;
server_name localhost;
#charset koi8-r;
#access_log logs/host.access.log main;
location / {
root html;
index index.html index.htm;
}
#error_page 404 /404.html;
# redirect server error pages to the static page /50x.html
#
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
###表示以http://localhost/fwq开头的本转发到http://localhost:8888/
###意思就是http://localhost:8888/会替换连接中的http://localhost/fwq
location ^~ /fwq {
proxy_pass http://localhost:8888/;
}
location ^~ /test {
proxy_pass http://localhost:8080/;
}
location /ui {
alias D:/root;
index index.html;
}
}
Nginx动态代理
最新推荐文章于 2024-07-26 11:20:39 发布