[users@httpd] Proxying requests not on MyMachine

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

 



	I want to use Apache to implement this scenario: Client -> MyMachine
(with static content + cache, back to client if request here -> Remote
Server -> MyMachine (remote content in MyCache, if applicable) -> Client.

Currently, I use this configuration-
	
RewriteEngine On	
RewriteMap lowercase int:tolower
RewriteCond  %{REQUEST_URI}  !^/error/ 		
RewriteRule ^/(.*)$ /webcontent/${lowercase:%{SERVER_NAME}}/$1 

RewriteCond  %{DOCUMENT_ROOT}%{REQUEST_FILENAME}  -d 
RewriteCond  %{DOCUMENT_ROOT}%{REQUEST_FILENAME}index.htm  -s
RewriteRule  ^/(.*)$ - [S=3]

RewriteCond  %{DOCUMENT_ROOT}%{REQUEST_FILENAME}  -s 
RewriteRule  ^/(.*)$ - [S=2]

RewriteCond  %{DOCUMENT_ROOT}%{REQUEST_FILENAME}  !-s 
RewriteCond  %{SERVER_PORT}  !443
RewriteRule  ^(.*)$  http://${lowercase:%{SERVER_NAME}}%{REQUEST_URI}
[P,S=1]

RewriteCond  %{DOCUMENT_ROOT}%{REQUEST_FILENAME}  !-s 
RewriteCond  %{SERVER_PORT}  443
RewriteRule  ^(.*)$
https://${lowercase:%{SERVER_NAME}}%{REQUEST_URI}%{QUERY_STRING} [P]

RewriteLog logs/rewriteLog 
RewriteLogLevel 9

	The problem is that if the last rewrite rule applies, the request
for remote content is proxied with the [P] flag (mod_rewrite?, ProxyPass?)
which does not proxy basic, NTLM, or ssl authentication. Authentication
works fine if I simply use 'ProxyRequests On,' but then the rewrites are
proxied too. How can I proxy in the same manner as 'ProxyRequests On' and
still use the Rewrite module?




---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



[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