一、nginx 反向代理实例
1、实现效果
通过nginx跳转到tomcat主页面上
2、nginx配置 URL:http://127.0.0.1:8000/index.html
worker_processes 1;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
keepalive_timeout 65;
server {
listen 8000;
server_name localhost;
location / {
root html;
proxy_pass http://127.0.0.1:8010;
index one.html;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
}
}
二、nginx 反向代理 实例
1、实现效果
使用nginx反向代理,根据访问的路径跳转到不同端口的服务中
2、nginx配置 URL:http://127.0.0.1:8000/bbb/index.html
worker_processes 1;
events {
worker_connections 1024;
}
http {
include