Reverse Proxy Support - Config Issue
Posted by: igrummett (---.static.tpgi.com.au)
Date: September 03, 2021 10:54AM

I have a strange issue with my WAMP (Version 3.2.3 - 64bit) configuration using Apache and reverse proxy.

3 Servers

1. Server 1 (http://192.168.0.31) - Gateway server running Windows 10 and WAMP to act as a host & gateway
2. Server 2 (http://192.168.0.7) – WAMP Server – Running Windows 10 and WAMP hosting a number of test sites and served via Server 1 - Gateway_Server
3. Server 3 (http://192.168.0.65) - IIS_Server – Running Windows 10 and IIS to server .net application via Server 1 – Gateway Server.

Most of my configuration is working apart from one part.
Servers 1 & 2 are working correctly with all sites served correctly. The problem I have is Server 3.
Server 3 Summary
The .net application is working correctly and can be accessed via localhost.
The .net application is working correctly and accessible externally IF I access directly and not via Server 1 – Gateway server.
As everything is working on Server 3 it leads me to think the issue is with Server 1 configuration.


This is the httpd.vhosts.conf for Server 1


#Virtual Hosts on HTTPD-vhosts.conf - working fine

<VirtualHost *:80> - working correctly
ServerName localhost
ServerAlias localhost
DocumentRoot "${INSTALL_DIR}/www/"
<Directory "${INSTALL_DIR}/www/">
Options +Indexes +Includes +FollowSymLinks +MultiViews
AllowOverride All
Require all granted
</Directory>
</VirtualHost>


#localhost for demo on Server 1 -working correctly
<VirtualHost *:80>
ServerName local.demo
DocumentRoot "c:/wamp64/www/demo"
<Directory "c:/wamp64/www/demo/">
Options +Indexes +Includes +FollowSymLinks +MultiViews
AllowOverride All
Require local
</Directory>
</VirtualHost>

#demo.myexample.com on Server 1 - working correctly
<VirtualHost *:80>
ServerName demo.myexample.com
DocumentRoot "c:/wamp64/www/demo"
<Directory "c:/wamp64/www/demo/">
Options +Indexes +Includes +FollowSymLinks +MultiViews
AllowOverride All
Require all granted
</Directory>
</VirtualHost>

#Site 1 Hosted on Server 2 - working correctly
<VirtualHost *:80>
ServerName site1.example.com
DocumentRoot "c:/wamp64/www/site1"
<Location />
ProxyPass [192.168.0.7]
ProxyPassReverse [192.168.0.7]
AllowOverride All
Require all granted
</Location>
<Directory "c:/wamp64/www/site1/">
Options +Indexes +Includes +FollowSymLinks +MultiViews
AllowOverride All
Require all granted
</Directory>
</VirtualHost>

#.net App Hosted on Server – NOT WORKING
<VirtualHost *:80>
ServerName netapp.anotherexample.com
<Location />
ProxyPass [192.168.0.65]
ProxyPassReverse [192.168.0.65]
AllowOverride All
Require all granted
</Location>
DocumentRoot "C:/netapproot/netapp"
<Directory "C:/netapproot/netapp/">
Options +Indexes +Includes +FollowSymLinks +MultiViews
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
_______________________________


Help Required
When I try and access the site I get
Not Found
HTTP Error 404. The requested resource is not found.

I do not understand why, given the net app is working is does not work with this configuration.
As explained:-
• I am able to access Server 3 via localhost and the internal IP address from Server 1
• I am able to access Server 3 externally if I access directly and not via Server 1. I do this by forwarding all web traffic 192.168.0.65 and not 192.168.0.7
Any thoughts much appreciated.



Edited 1 time(s). Last edit at 09/03/2021 12:10PM by RiggsFolly.

Options: ReplyQuote
Re: Reverse Proxy Support - Config Issue
Posted by: RiggsFolly (Moderator)
Date: September 03, 2021 12:46PM

Hi,
This is not really a WAMPServer issue, its a dont know how to setup Apache as a proxy issue.

I am not an expert by any means on proxy but your config is telling Apache it can server the site. I think you will need to do a bit more research, on the Apache site, to find out how to setup a proxy properly.

---------------------------------------------------------------------------------------------
(Windows 10 Pro 64bit) (Wampserver 3.3.4 64bit) Aestan Tray Menu 3.2.5.4
<Apache versions MULTIPE> <PHP versions MULTIPLE> <MySQL Versions MULTIPLE>
<MariaDB versions MULTIPLE> <phpMyAdmin versions MULTIPLE> <MySQL Workbench 8.0.23>

Read The Manuals Apache -- MySQL -- PHP -- phpMyAdmin
Get your Apache/MySQL/mariaDB/PHP ADDONs here from the WAMPServer alternate Repo
-X-X-X- Backup your databases regularly Here is How dont regret it later! Yes even when developing -X-X-X-

Options: ReplyQuote


Sorry, only registered users may post in this forum.