[users@httpd] Reverse Proxy and SSI from Back-End Apache

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

 



Hi,
 
I have a setup of Front / Back Apache Reverse Proxy. Front Apache is running on port 80 and Back Apache is running on 8080. SSI OPTIONS is enabled on both the Apache.
 
I have a requirement that all files are to be served from the front Apache except the /mycomps folder. The mycomps folder ScriptAlias. Requests to /mycomps should go to Back Apache.
 
Uptill this point everything is working as expected.
 
That is:

If I try to access http://ds.india.noida/mycomps/testsuccess.html it gets served from Back Apache as desired (confirmed from the logs) -- Good !

Now, I have another page "dstest.html" into the DocumentRoot folder which, has a virtual include tag as:

<!--#include virtual="/mycomps/testsuccess.html" -->

But, the problem is that when I try to access http://ds.india.noida/dstest.html the SSI /mycomps/testsuccess.html also gets parsed from the Front Apache.

I wish that dstest.html should get served from Front Apache but "/mycomps/testsuccess.html" should get parsed from Back Apache.

I would be thankful for any pointers please !

Here is my config:

Front Apache Virtual Host on port 80:
<VirtualHost 10.216.204.59>
   ServerAlias ds.india.noida www.ds.india.noida ds.india
   ServerName www.ds.india.noida
   ServerAdmin dee.ess@xxxxxxxxx
   DocumentRoot /home/www/html/jobs
   ServerPath /jobs
   ScriptAlias /mycomps/ "/home/www/html/mycomps/"
   <Directory /home/www/html>
      Options FollowSymLinks Includes
      AddHandler server-parsed .html
      AddOutputFilter INCLUDES .html
   </Directory>
   RewriteEngine On
   RewriteRule \.(gif|jpg|png|txt|css|js|ico|swf)$ [OR]
   RewriteRule !\/mycomps\/.* - [last]
   RewriteRule ^/(.*)$ http://ds.india.noida:8080/$1 [proxy]
   ProxyPassReverse / http://ds.india.noida:8080/
   CustomLog /home/logs/ds_access_log combinedref env=!DONOTLOGIMAGE
</VirtualHost>

Back Apache Virtual Host on Port 8080:
<VirtualHost 10.216.204.59>
   ServerAlias ds.india.noida www.ds.india.noida ds.india.noida
   ServerName ds.india.noida
   ServerAdmin dee.ess@xxxxxxxxx
   DocumentRoot /home/www/html/jobs
   ServerPath /jobs
   <Directory /home/www/html>
      Options FollowSymLinks Includes
      AddHandler server-parsed .html
      AddOutputFilter INCLUDES .html
   </Directory>
</VirtualHost>

The entries for ds.india.noida www.ds.india.noida ds.india are into my /etc/hosts file.

Thanks again.

Devendra Singh
S-4/A-116, Shalimar Garden Ext-II
Sahibabad, Ghaziabad (UP) - 201005
Ph# +91+11-2637495
Mobile# +91-9818342483

 

[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