7080 A project 8080 A has A B engineering
Want to pass the nginx by IP + A/IP + B directly access without port
Excuse me, can realize how to implement it
Nginx. Conf how to configure
Yourself with several times, all is restart after the container is not launched
The small white, just a few days to install nginx, baidu for a long time, has been card here
CodePudding user response:
Docker, fix configuration to commitThe location ^ ~/A/{
Proxy_set_header Host $Host;
Proxy_set_header X - Real - IP $remote_addr;
Proxy_set_header X - Forwarded - For $proxy_add_x_forwarded_for;
Proxy_set_header X - NginX Proxy true;
Proxy_pass http://IP:A/;
}
The location ^ ~/B/{
Proxy_set_header Host $Host;
Proxy_set_header X - Real - IP $remote_addr;
Proxy_set_header X - Forwarded - For $proxy_add_x_forwarded_for;
Proxy_set_header X - NginX Proxy true;
Proxy_pass http://IP:B/;
}