I tried to setup nginx as reverse-proxy for multiple websites on multiple web servers, but no luck. Below is my config:
http {
server {
listen 80; #10.1.1.134
server_name pass.bellsports.sportsgroup.loc;
#rewrite ^ http://pass.bellsports.sportsgroup.loc$request_uri? last;
proxy_redirect off;
access_log /var/log/nginx/pass.access.log;
location / { proxy_pass http://10.1.1.118/passwordmgr/user; }
}
server {
listen 80; #10.1.1.134
server_name self.bellsports.sportsgroup.loc;
#rewrite ^ http://self.bellsports.sportsgroup.loc$request_uri? redirect;
proxy_redirect off;
access_log /var/log/nginx/self.access.log;
location / { proxy_pass http://10.1.1.184/ARServerSelfService; }
}
}
I searched google but I saw many posts are saying about the virtualhosts on the reverse proxy itself. Please give me a hint, I really appreciated.