Re: Apache Reverse Proxy for more than one website.

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

 



My current configuration is:

<VirtualHost *:80>
     ServerName node3
     ErrorLog /var/log/httpd/error_log
     TransferLog /var/log/httpd/access_log
     <Location />
         ProxyPass  http://192.168.1.4/ ;
         ProxyPassReverse   http://192.168.1.4/
     </Location>
   </VirtualHost>

   <VirtualHost *:80>
     ServerName node4
     ErrorLog /var/log/httpd/error_log
     TransferLog /var/log/httpd/access_log
     <Location />
         ProxyPass  http://192.168.1.20/ ;
         ProxyPassReverse   http://192.168.1.20/
     </Location>
   </VirtualHost>

And my Reverse Proxy can see both of Apache web servers:

# curl http://192.168.1.20/
<html>
    <head>
        <title> This is first server. </title>
    </head>
    <body>
        <p> Hello Server. </p>
    </body>
</html>
#
# curl http://192.168.1.4/
<html>
    <head>
        <title> This is second server. </title>
    </head>
    <body>
        <p> Hello Server. </p>
    </body>
</html>

My goal is:

The Internet ---> Apache Reverse Proxy ---> Apache Web Server 1 (IP: 1.2.3.4, Name: Yahoo.com)
                                                                 ---> Apache Web Server 2 (IP: 1.2.3.5, Name: Google.com)

Yahoo.com and Google.com are example.

A Reverse Proxy server that service to multiple web server with different IPs and domain names.





On Wednesday, March 17, 2021, 05:15:35 PM GMT+3:30, Antony Stone <antony.stone@xxxxxxxxxxxxxxxxxxxxx> wrote: 





On Wednesday 17 March 2021 at 14:40:32, Jason Long wrote:

> Thank you.
> Which part of my configuration is wrong?

I don't know.  I've lost track of what your configuration looks like now.

> My Reverse Proxy can see my Apache web servers and as I said, its worked
> with one host, but can't work with two hosts. it sounds like, my Reverse
> Proxy just see the first Virtual Host config!!!

Show us what your configuration looks like now, and also tell us how you are 
testing it, what you expect the results to be, and what results you actually 
get.


Antony.

-- 
"Measuring average network latency is about as useful as measuring the mean 
temperature of patients in a hospital."

- Stéphane Bortzmeyer


                                                  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