Re: [users@httpd] Question about Apache RewriteCond Syntax on Proxy Configuration

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

 




Thank You Joshua for commenting my proxy settings.

>> Exactly what types of request do you want to go to what place?

My goal for this set up is to

1) run jsp pages from the main web server Helsinki,
where is the application process, which communicates with Oracle database.

2) From Madison Apache Proxy site, I would like to use files
- eMatrixAppletDownloadXML.jar
- SwingDownload.jar
- eMatrixAppletDownload.cab
- SwingDownload.cab
- Matrix.class
- all files ending with jpg, gif, pdf, png, zip, tgz, gz, html, htm, css and js

Everything else, that is NOT specified above, I want to use from Helsinki Main web server.
What would be the correct syntax ?
I tried following, which is not working:

ProxyPassReverse / http://sun-MADISON:7003/
RewriteEngine On
RewriteLog "/usr/local/apache2-2.0.52/logs/rewrite.log"
RewriteLogLevel 9
RewriteCond %{REQUEST_URI} !.*\.(eMatrixAppletDownloadXML.jar|SwingDownload.jar|eMatrixAppletDownload.cab|SwingDownload.cab|Matrix.class|jpg|gif|pdf|png|zip|tgz|gz|html|htm|css|js)$
RewriteRule ^/(.*) http://sun-MADISON:7003/$1 [P]

Attached is the rewrite.log.

br,

Paula


 


Joshua Slive <jslive@xxxxxxxxx>

21/04/2005 16:10

Please respond to
users@xxxxxxxxxxxxxxxx

To
users@xxxxxxxxxxxxxxxx
cc
Subject
Re: [users@httpd] Question about Apache RewriteCond Syntax on Proxy Configuration





On 4/21/05, Paula Nousiainen <paula.nousiainen@xxxxxxxxxxx> wrote:
>  
> Hi,
> How could I make my Apache static content proxy to understand specified file
> names ?
>  
> I have  a global system with users in US Madison and in Finland Helsinki.
> Helsinki is the main site and Madison users are using remotely DB located in
> Helsinki.
>  
> User at Madison connects to application through Apache 7003 port:
> http://sun-MADISON:7003/ematrix_xml/WebClient/eMatrixAppletDownloadXML-MDS.jsp
>  
> Plan is to forward all other request to main web server at Helsini except
> applets mentioned in first RewriteCond
> and static files defined in second RewriteCond:
>  
> -------------------------------------------------------------------------
> ProxyPassReverse / http://sun-MADISON:7003/
> RewriteEngine On
> RewriteCond %{REQUEST_URI}
> !.*(eMatrixAppletDownloadXML.jar|SwingDownload.jar|eMatrixAppletDownload.cab|SwingDownload.cab)$
> [OR]
> RewriteCond %{REQUEST_URI}
> !.*\.(jpg|gif|pdf|png|zip|tgz|gz|html|htm|css|js)$
> RewriteRule ^/(.*) http://sun-MADISON:7003/$1 [P]
> --------------------------------------------------------------------
>  
> Please, help me to find the reason why this is not working as excepted ?

Well, your problem is not clearly specified.  Exactly what types of
request do you want to go to what place?  Obviously the above
RewriteConds are bad: Any request will match either one or the other.
If what you want to do is exclude all those jars and other extensions
from the proxy,then simply remove the [OR] to get the proper logic.

In general, you should always use the RewriteLog to help debug
mod_rewrite problems.

Joshua.

---------------------------------------------------------------------
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


Attachment: ReWrite.log-TO-APACHE-GROUP
Description: Binary data

---------------------------------------------------------------------
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