Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Apache2 Proxy, send user to another webserver?

Linux Kernel, Network, and Services configuration.
Post Reply
Message
Author
Storsnusarn^
Posts: 15
Joined: 2015-10-29 00:39

Apache2 Proxy, send user to another webserver?

#1 Post by Storsnusarn^ »

I have been running something similar before and it has been working perfectly for my needs, however due to a crash i had to reinstall my machines and when coming to the webserver i can't seem to get the proxy-settings to work very well anymore.

Here is my setup:
  • Server_1 - This is my main webserver that gets all requests from the internet, this is where i have all virtualhosts to several webpages, most of them stored at diffrient locations on this server. IP-adress: 192.168.1.3 (Debian Stable, Apache 2.4)
  • Server_2 - This is the second webserver not exposed to the internet (port 80 and 443 invisable), on this server i only want to serve one page, the default htdocs-directory. IP-adress: 192.168.1.2 (Windows Server 2008 R2, Apache 2.4)
On Server_1 i have been seiing up one virtualhost like following:

Code: Select all

<VirtualHost *:80>
	ServerName mydomain.no-ip.com
	ProxyPass / http://192.168.1.2:80/
	ProxyPassReverse / http://192.168.1.2:80/
	ProxyPreserveHost On
	ProxyRequests Off

<Location /phpmyadmin>
	Order Deny,Allow
	Deny from all
	Allow from 127.0.0.1
	Allow from 192.168.1.2
	Allow from 192.168.1.3
	Allow from 192.168.1.100
</Location>

</VirtualHost>

And i have been a2enmod proxy, proxy_http and proxy_html on the same server.

What i believe this was the only thing i had to do back in the days but appearently it doesn't work at all; if i try to connect to my hostname in a browser (yes i have tried outside my own network too), i'm being sent to my default host (000-default) instead and that indicates that the IP is pointed correctly but something must be wrong with my configuration.

Would really be happy for some help :-) Thanks! // Storsnusarn^

Edit: Problem solved, somehow i was right :mrgreen:

Post Reply