Jump to content

Linux apache reverse proxy

Go to solution Solved by Reddax,
10 hours ago, Xkape said:

I would suggest just setting up a separate apache server with that reverse proxy on the test server as it sounds like you are using apache on your live server to point to your test?. Keep your test environment completely separate from your live environment. I think that is best practice at least.

 

Looks like i've sorted it, if the server goes down it doesn't bring down the rest of the websites, here is my reverse proxy config;

 

<VirtualHost *:80>
    ServerAdmin administrator@test.co.uk
    ProxyRequests off
    DocumentRoot /var/www
    ProxyPreserveHost On
    ServerName testsite.co.uk
    <Location />
        ProxyPass http://testsite.co.uk/
        ProxyPassReverse http://testsite.co.uk/
        Order allow,deny
        Allow from all
    </Location>
</VirtualHost>

 

I've got an apache server running a couple of wordpress websites and also a reverse proxy to another server which I use for testing.

However, if the test server which the reverse proxy points to goes down, it brings all the websites down with the error of; 

The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later.

 

Is there any way to stop the reverse proxy bringing down all the sites if the reverse proxy cant find the site?

 

Here is my reverse proxy config;

<IfModule mod_proxy.c>

ProxyRequests Off
ProxyPreserveHost On
ProxyReceiveBufferSize 4096
<Proxy *>
    Order deny,allow
    Allow from all
</Proxy>
ProxyPass / http://testsite.co.uk/
ProxyPassReverse / http://testsite.co.uk/
<Location />
Order allow,deny
Allow from all
</Location>

 

i7 4790k (Hyper 212 Evo); GA-Z87X-UD3H; 16gb G Skill PC3-19200 DDR3 @ 2400MHz; GeForce GTX 1080 ; Corsair CX600M 600W PSU; Samsung 860 EVO 500GB &  3TB HDD; Windows 10 64bit.

Link to comment
https://linustechtips.com/topic/953163-linux-apache-reverse-proxy/
Share on other sites

Link to post
Share on other sites

I would suggest just setting up a separate apache server with that reverse proxy on the test server as it sounds like you are using apache on your live server to point to your test?. Keep your test environment completely separate from your live environment. I think that is best practice at least.

Link to post
Share on other sites

10 hours ago, Xkape said:

I would suggest just setting up a separate apache server with that reverse proxy on the test server as it sounds like you are using apache on your live server to point to your test?. Keep your test environment completely separate from your live environment. I think that is best practice at least.

 

Looks like i've sorted it, if the server goes down it doesn't bring down the rest of the websites, here is my reverse proxy config;

 

<VirtualHost *:80>
    ServerAdmin administrator@test.co.uk
    ProxyRequests off
    DocumentRoot /var/www
    ProxyPreserveHost On
    ServerName testsite.co.uk
    <Location />
        ProxyPass http://testsite.co.uk/
        ProxyPassReverse http://testsite.co.uk/
        Order allow,deny
        Allow from all
    </Location>
</VirtualHost>

 

i7 4790k (Hyper 212 Evo); GA-Z87X-UD3H; 16gb G Skill PC3-19200 DDR3 @ 2400MHz; GeForce GTX 1080 ; Corsair CX600M 600W PSU; Samsung 860 EVO 500GB &  3TB HDD; Windows 10 64bit.

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×