Welcome! Log In Create A New Profile

Advanced

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

Posted by davidchow 
This forum is currently read only. You can not log in or make any changes. This is a temporary situation.
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

Online Users

Guests: 306
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