Mobile app version of vmapp.org
Login or Join
Eichhorn148

: Apache Reverse Proxy I would like to host 2 Joomla! websites on separate machines using XAMPP with Apache. I need to make sure it is configured the correct way but I am not sure if I understand

@Eichhorn148

Posted in: #Apache #Joomla #Proxy #Xampp

I would like to host 2 Joomla! websites on separate machines using XAMPP with Apache. I need to make sure it is configured the correct way but I am not sure if I understand how it is to be written in the config files.(on both PC's)

things to be configured as far as I know:


Host file
httpd file to allow proxy
vhost file


I have all the basics set up on the "proxy" to run multiple websites from the one server. However I want to put one of the websites on a separate server on its own and still be able to run multiple sites from the first.

for the sake of example my IP address from the ISP is 12.123.124.12

the internal addresses for each machine:


server1: 192.168.1.146
server2: 192.168.1.114


I know that I can do this from one machine with Virtual Hosts but I would like to accomplish it with two separate machines...

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Eichhorn148

1 Comments

Sorted by latest first Latest Oldest Best

 

@Ravi8258870

First, make sure you have mod_proxy* enabled (there are multiple proxy modules, so enable all of them for simplicity).

Then copy this into your main configuration file:

<VirtualHost *:80>
# Where 'ServerName' is the domain of this site.
ServerName joomla-one.domain.org
ProxyRequests Off
ProxyPreserveHost On
ProxyVia full
# LOCAL IP of the backend server (must be the same both places)
ProxyPass / 192.168.1.146:80/ ProxyPassReverse / 192.168.1.146:80/ # The name of the log (so you can identify traffic)
ErrorLog /var/log/apache2/error_joomla1.log
LogLevel warn
CustomLog /var/log/apache2/access_joomla1.log combined
</VirtualHost>
<VirtualHost *:80>
# Where 'ServerName' is the domain of this site.
ServerName joomla-two.domain.org
ProxyRequests Off
ProxyPreserveHost On
ProxyVia full
# LOCAL IP of the backend server (must be the same both places)
ProxyPass / 192.168.1.114:80/ ProxyPassReverse / 192.168.1.114:80/ # The name of the log (so you can identify traffic)
ErrorLog /var/log/apache2/error_joomla2.log
LogLevel warn
CustomLog /var/log/apache2/access_joomla2.log combined
</VirtualHost>


This actually combines a VirtualHost with a backend server via the Apache (reverse) proxy. Please post a comment if it does or does not work; I will try to edit my answer to accommodate your system.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme