反向代理同事hosts也需要配置
server
{
listen 80;
server_name localhost;
location /centos {
proxy_pass http://mirrors.163.com/centos/;
}
}
端口映射
最外层
#user nobody;
worker_processes 1;
error_log logs/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log info;
stream{ proxy_timeout 30m;
server{
listen 1521;
proxy_pass 192.168.1.30:1521; }
}
参考
https://blog.csdn.net/qq_31226223/article/details/78766314