httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Norman Khine <nor...@khine.net>
Subject [users@httpd] ReWrite not working on Gentoo and OSX
Date Fri, 27 Jul 2007 19:29:10 GMT
Hello,
I have a strange behaviour, in that I have the following apache conf file:
<VirtualHost *:80>
   ServerName abakuc.expert.travel
   RewriteEngine On
   RewriteRule ^/(.*) http://localhost:8080/companies/abakuc/$1 [P]
   RequestHeader set X-Base-Path companies/abakuc
   RewriteLogLevel 0
   RewriteLog /tmp/abakuc_expert_rewrite.log
   ErrorLog       /tmp/abakuc_expert_error.log
</VirtualHost>

Now this does not work on my OSX 10.4 with Apache 2.0.59 nor does it
work on my Gentoo

But if I replace
-    ServerName abakuc.expert.travel
+    ServerName abakuc.expert_travel

Such that

<VirtualHost *:80>
   ServerName abakuc.expert_travel
   RewriteEngine On
   RewriteRule ^/(.*) http://localhost:8080/companies/abakuc/$1 [P]
   RequestHeader set X-Base-Path companies/abakuc
   RewriteLogLevel 0
   RewriteLog /tmp/abakuc_expert_rewrite.log
   ErrorLog       /tmp/abakuc_expert_error.log
</VirtualHost>

It works?!?

Where as the first rule works fine on Ubuntu and Debian

The only thing that I can think of is that as expert.travel A record
already exists and it points to my production server somehow my local
Apache is using this?

Should it?

But the error is being returned from the local apache not the server.

I have added the entries to my /etc/hosts file

127.0.0.1 abakuc.expert.travel
127.0.0.1 abakuc.expert_travel

Any advise much appreciated.
-- 
Norman Khine

%>>> "".join( [ {'*':'@','^':'.'}.get(c,None) or chr(97+(ord(c)-83)%26)
for c in ",adym,*)&uzq^zqf" ] )


---------------------------------------------------------------------
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@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message