RE: Proxy problems when using subdirectory (UNCLASSIFIED)

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

 



Classification: UNCLASSIFIED
Caveats: FOUO

Your configuration:

     ProxyPass /a/ http://192.168.0.51:80/
     ProxyPassReverse /a/ http://192.168.0.51:80/

Will not proxy /docs to /a/docs. For that you need:

     ProxyPass / http://192.168.0.51:80/a/
     ProxyPassReverse / http://192.168.0.51:80/a/

Nick


-----Original Message-----
From: H Plato [mailto:hplato@xxxxxxxxx] 
Sent: Wednesday, November 19, 2014 10:01 PM
To: users@xxxxxxxxxxxxxxxx
Subject: Re:  Proxy problems when using subdirectory

So I put this in a <location /a/> block so that only those URLs get written. No success. Thanks for the suggestion though.


	On Nov 19, 2014, at 3:26 PM, Otis DeWitt <otis.dewitt@xxxxxxxx> wrote:

	Try adding:

	RewriteRule   ^(.*)$   http://www.domain.com/ <http://www.domain2.com/> $1   [R=301,L]
	
	Sent from my iPhone

	On Nov 18, 2014, at 8:38 PM, H Plato <hplato@xxxxxxxxx> wrote:
	
	

		I’m having problems getting a reverse proxy to work as a subdirectory. Using the following configuration, Apache can full proxy an internal site:
		
		<VirtualHost 192.168.0.50:80>
		   ServerName www.domain.com <http://www.domain.com/> 
		   DocumentRoot /data/www/www
		   ErrorLog /var/log/apache2/www_error_log
		   TransferLog /var/log/apache2/www_access_log
		
		   <Directory "/">
		       Options Indexes FollowSymLinks ExecCGI
		       AllowOverride AuthConfig
		               Order allow,deny
		       Allow from all
		       AllowOverride All
		       Require all granted
		   </Directory> 
		
		      ProxyRequests Off
		      ProxyPass / http://192.168.0.51:80/ <http://192.168.0.51/>  
		      ProxyPassReverse / http://192.168.0.51:80/ <http://192.168.0.51/>  
		      ServerAlias www.proxy.domain.com <http://www.proxy.domain.com/> 
		      ServerName proxy.domain.com <http://proxy.domain.com/> 
		   
		</VirtualHost>
		
		However, when I change the proxy statements to use a subdomain:
		
		      ProxyPass /a/ http://192.168.0.51:80/ <http://192.168.0.51/>  
		      ProxyPassReverse /a/ http://192.168.0.51:80/ <http://192.168.0.51/>  
		
		then I get inconsistent results. Any link on the internal site that has root link (i.e.. href=“/docs” ) none of these are proxied to /a/docs. Any link with a relative link (i.e. href=“docs”) works.
		
		I’m using Ubuntu 14.04.1 with  Apache/2.4.7 (Ubuntu) Server built:   Jul 22 2014 14:36:38
		
		I’ve been struggling with this for days, so any ideas or help would be greatly appreciated.
		
		
		
		---------------------------------------------------------------------
		To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
		For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx
		
		



Classification: UNCLASSIFIED
Caveats: FOUO


Attachment: smime.p7s
Description: S/MIME cryptographic signature


[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