Welcome! Log In Create A New Profile

Advanced

How to write a general config for doing number of the reverse proxies?

Posted by davidchow 
How to write a general config for doing number of the reverse proxies?
November 13, 2009 06:15AM
Hi all,

I am a beginner in using Nginx. I want to ask if I can write a single server statement to replace to following.

[code]
server{
listen 80
server_name HostA
location / {
proxy_pass http://HostA/
}
}
server{
listen 80
server_name HostB
location / {
proxy_pass http://HostB/
}
}
......
.....
[/code]

I want this because I have a lot of of websites needed to be set and it is hard for me to configure again and again when the websites are changed
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 85
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready