Re: Apache Reverse Proxy for more than one website.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Thanks.
Thus, I can one .conf file under the "/etc/httpd/conf.d/" directory with some servers. For example,

#Server 1
<VirtualHost *:80>
        ProxyPreserveHost On
        ProxyPass / http://192.168.1.4/
        ProxyPassReverse / http://192.168.1.4/
</VirtualHost>

#Server 2
<VirtualHost *:80>
        ProxyPreserveHost On
        ProxyPass / http://192.168.1./
        ProxyPassReverse / http://192.168.1.5/
</VirtualHost>




Am I right?


On Tuesday, March 16, 2021, 10:01:27 PM GMT+3:30, Antony Stone <antony.stone@xxxxxxxxxxxxxxxxxxxxx> wrote: 





On Tuesday 16 March 2021 at 19:16:56, Jason Long wrote:

> Hello,
> For a website, I created a reverse proxy config file under the
> "/etc/httpd/conf.d/" directory as below:
> 
> <VirtualHost *:80>
>        ProxyPreserveHost On
>        ProxyPass / http://192.168.1.4/
>        ProxyPassReverse / http://192.168.1.4/
> </VirtualHost>
> 
> If I have other servers, then I must create a config file for each of them
> or I just need to add my servers IP addresses to the above file?

You can put all your configurations into one file, that is not a problem.

You will need a completely separate <VirtualHost> section for each machine you 
want to act as a reverse proxy for.

Finally, I trust you realise that you cannot use <VirtualHost *:80> with more 
than one back-end server - there needs to be a way to distinguish which 
incoming requests are to be passed to server A and which ones to server B etc 
(in other words, you have to change the * to something which identifies what 
you want to reverse proxy to where).


Antony.

-- 
In Heaven, the beer is Belgian, the chefs are Italian, the supermarkets are 
British, the mechanics are German, the lovers are French, the entertainment is 
American, and everything is organised by the Swiss.

In Hell, the beer is American, the chefs are British, the supermarkets are 
German, the mechanics are French, the lovers are Swiss, the entertainment is 
Belgian, and everything is organised by the Italians.

                                                  Please reply to the list;
                                                        please *don't* CC me.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx





[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux