ProxyPass and Internal URLs

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

 



Good Day
 
Maybe this is teh wrong way to do this, but it works in other places. I have researched this extensively and found no absolute but easy to understand way to accomplish this, so please excuse my ignorance, this post is really two weeks after I started the project.
 
I have one IP address and two servers. I would like to make both servers visible from that one ip based on the requested host.
 
This works for an Exchange server (even with SSL) on one internal host and I cannot get it to work on another host with SSL.
 
Here is the relevant part of the httpd.conf:
 

<VirtualHost 0.0.0.0:80>

ServerName publicaddress1.com

ProxyPass / http://internaladdress1.local/

ProxyPassReverse / http://internaladdress1.local/

</VirtualHost>

 

<VirtualHost 0.0.0.0:443>

ServerName publicaddress1.com

ProxyPass / https://internaladdress1.local/

ProxyPassReverse / https://internaladdress1.local/

</VirtualHost>

 

<VirtualHost 0.0.0.0:80>

ServerName publicaddress2.com

ProxyPass / http://internaladdress2.local/

ProxyPassReverse / http://internaladdress2.local/

</VirtualHost>

 

<VirtualHost 0.0.0.0:443>

ServerName publicaddress2.com

ProxyPass / https://internaladdress2.local/

ProxyPassReverse / https://internaladdress2.local/

# ProxyPass Support for Internal Exchange Server

ProxyPreserveHost On

#OWA % character in email subject fix

RewriteEngine On

RewriteMap percentsubject int:escape

RewriteCond $1 ^/exchange/.*\%.*$

RewriteRule (/exchange/.*) ${percentsubject:$1} [P]

#OWA

ProxyPass /exchange https://internaladdress2.local/exchange

ProxyPassReverse /exchange https://internaladdress2.local/exchange

ProxyPass /owa https://internaladdress2.local/owa

ProxyPassReverse /owa https://internaladdress2.local/owa

ProxyPass /Exchange https://internaladdress2.local/exchange

ProxyPassReverse /Exchange https://internaladdress2.local/exchange

ProxyPass /exchweb https://internaladdress2.local/exchweb

ProxyPassReverse /exchweb https://internaladdress2.local/exchweb

ProxyPass /public https://internaladdress2.local/public

ProxyPassReverse /public https://internaladdress2.local/public

ProxyPass /iisadmpwd https://internaladdress2.local/iisadmpwd

ProxyPassReverse /iisadmpwd https://internaladdress2.local/iisadmpwd

#OMA

ProxyPass /oma https://internaladdress2.local/oma

ProxyPassReverse /oma https://internaladdress2.local/oma

#ActiveSync (for WM5+ devices)

ProxyPass /Microsoft-Server-ActiveSync https://internaladdress2.local/Microsoft-Server-ActiveSync

ProxyPassReverse /Microsoft-Server-ActiveSync https://internaladdress2.local/Microsoft-Server-ActiveSync

# End of Exchange settings

</VirtualHost>

 

Seriously I have been at this over a week now, and here is what happens:

 

1. If I open http://publicaddress2.com, I get http://internaladdress2.local contents and the browser address bar shows http://publicaddress2.com and all the relevant links work fine, the site functions well and as expected.

 

2. If I open http://publicaddress1.com, I get http://internaladdress1.local contents and the browser address bar shows http://publicaddress1.com and all the relevant link work fine, the site functions well and as expected.

 

3. If I open https://publicaddress2.com, I get https://internaladdress2.local contents and the browser address bar shows http://publicaddress2.com and all the relevant link work fine, the site functions well and as expected. All the virtual directories and all Exchange functionality is fine, so I know the links all work as do the script requests etc.

 

4. But, for some reason, if I open https://publicaddress1.com, I get 404 and the browser address bar shows http://internaladdress1.com and all the relevant link work fine, the site functions well and as exzpected. I tried to rewrite with as much mixed success as there are opinions to do this...

 

Any help is greatly appreciated, I know from my research there are a heap of people battlinf with this, so I am confident a solution will be suitable for many users, not just me.

 

Many thanks in advance.

 

 

Gund

 

 


[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