RE: Location/locationmatch on Windows install

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

 



Thanks Tom for the reply,

I'll have to look up how to whack up the log level and where to find the
whacked up rewrite log :)  Seriously, though, I don't know what log
level we need to be at to get a rewrite log or whether or not I need to
specify a rewrite log location.

I used LocationMatch because I will have users coming in on lets say
these 3 "like" urls:

https://yippidy.doodaa.com:8543/pls/test/something.something/moreofstuff
Idon'tknow
https://yippidy.doodaa.com:8643/pls/devl/something.something/moreofstuff
Idon'tknow
https://yippidy.doodaa.com:8743/pls/prod/something.something/moreofstuff
Idon'tknow

Notice the differences in ports and the only difference in the url being
the port and the test/devl/prod.  There might be a firewall that sits in
front that only allows world access to prod's port, whereas test and
devl access stay on the local lan.

Nothing in the application will prevent a user from typing in "test" on
the "prod" port and successfully gain access to the test side from
outside the local lan.

So a simple "fix", at least to me, was to test to see if they were
coming in on a "prod" url, make sure it is on the prod port, and if not,
simply rewrite it to be so.  If they were coming in on a "test" url but
on the prod port, it'd get rewritten to test's port and the firewall
would prevent access if they were outside the local lan.  If it's just
as easy to do that with rewrite conditions, I'm all ears, but I could
really use the help with syntax, I'm just a lowly Oracle DBA :)

Todd


-----Original Message-----
From: Tom Evans [mailto:tevans.uk@xxxxxxxxxxxxxx] 
Sent: Friday, November 07, 2008 10:47 AM
To: users@xxxxxxxxxxxxxxxx
Subject: Re:  Location/locationmatch on Windows install

On Fri, 2008-11-07 at 07:44 -0500, Randall, Todd wrote:
> Hi All,
> 
> I've searched and searched and can't find any pertinent info.  Please
> believe me, I'm sending to this list as my last resort.
> 
> Is there some trick to location or locationmatch syntax on an Apache
on
> Windows installation vs. an Apache on Unix / Linux installation?  I
> suppose I should also tell you this is Apache built into the Oracle
> Application Server, which is an older version, 1.3.31.0.0.  I also
have
> a support ticket open with Oracle for a good week now.
> 
> I have this code, at the very end of the httpd.conf file, on a Linux
> installation, and it works perfectly fine:
> 
> <LocationMatch ^.*/pls/test.*>
>     RewriteEngine On
>     RewriteCond %{SERVER_PORT} !^8543$
>     RewriteRule ^/(.*)$ https://yippidy.doodaa.com:8543%{REQUEST_URI}
> [L,R]
> </LocationMatch>

Why a LocationMatch, instead of a RewriteCond ? Does it work with a
RewriteCond? (With LocationMatch, we have to think "did we trigger the
location match? If we did, did our RewriteRule match?", with
RewriteCond, all we have to think is "Did our cond match, what happened
when our rewrite happened", all of which can be answered by whacking on
the rewrite log and whacking up the log level.)

> 
> The same exact version/installation of Apache on a Windows XP Server,
> same code, same place in the httpd.conf file, will not work.  I can
> comment out the LocationMatch, and the rewrite kicks in and works
fine,
> but for the life of me I cannot get the LocationMatch to kick in.
I've
> even just tried a Location test (using just http in case https was
> buggy) on a simple directory like this:
> 
> <VirtualHost *:81>
>     ServerName yippidy.doodaa.com
>     DocumentRoot "D:\oas10gR2\Apache\Apache\htdocs\testfororacle"
>     DirectoryIndex index.htm
>     Alias /htdocs D:\oas10gR2\Apache\Apache\htdocs/
> </VirtualHost>
> 
> <Location /htdocs/testfororacle>
>    RewriteEngine On
>    RewriteRule ^/(.*)$ http://yippidy.doodaa.com/index.html.en [L,R]
> </Location>
> 
> Works perfect when converted to Linux, will not kick in on Windows.
> Unfortunately, I cannot change this Windows install to Linux.  What
> could I possibly be missing on the Windows side?
> 
> Many thanks in advance,
> Todd



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


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