howto setup nginx for multiple websites
November 25, 2009 03:01PM
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.
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 123
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready