You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Jason Pruim <ja...@raoset.com> on 2008/09/08 12:09:14 UTC

[users@httpd] Virtual hosts and mod_rewrite

Good morning everyone,

I am breaking into new territory in my knowledge, and I've hit a bit  
of a speed bump that searching and trial/error has not been able to  
fix for me. Here's some details:

I am running Apache 1.3
PHP 5.2

I have setup a virtual host... http://purl.schreurprinting.com/jasonpruim112 
  (Which won't resolve out side of here yet... I am in contact with  
the hosting company to fix that issue)

Locally it works great.. Once.. As soon as the web page is loaded  and  
you attempt to refresh or go to a different page, it says "Forbidden  
you do not have permission to access /jasonpruim112 on this server"

all the info for the page is being pulled from the database, if you  
want to see how it works you can visit the public dev site at: HTTP://www.raoset.com/dev/schreurprinting.com/p.php?purl=jasonpruim112 
  and that page loads just fine...

Once I restart web services it comes back up and starts working  
again... Does anyone have any ideas as to what is going on?

Here is a sample from my rewrite log of a successful rewrite:
92.168.0.253 - - [05/Sep/2008:06:24:21 -0400]  
[purl.schreurprinting.com/sid#183ecd8][rid#1836238/initial] (2) init  
rewrite engine with requested uri /jasonpruim112
192.168.0.253 - - [05/Sep/2008:06:24:21 -0400]  
[purl.schreurprinting.com/sid#183ecd8][rid#1836238/initial] (3)  
applying pattern '/(.*)' to uri '/jasonpruim112'
192.168.0.253 - - [05/Sep/2008:06:24:21 -0400]  
[purl.schreurprinting.com/sid#183ecd8][rid#1836238/initial] (2)  
rewrite /jasonpruim112 -> /volumes/raider/webserver/documents/dev/ 
schreurprinting.com/p.php?purl=jasonpruim112&edit=
192.168.0.253 - - [05/Sep/2008:06:24:21 -0400]  
[purl.schreurprinting.com/sid#183ecd8][rid#1836238/initial] (3) split  
uri=/volumes/raider/webserver/documents/dev/schreurprinting.com/p.php? 
purl=jasonpruim112&edit= -> uri=/volumes/raider/webserver/documents/ 
dev/schreurprinting.com/p.php, args=purl=jasonpruim112&edit=
192.168.0.253 - - [05/Sep/2008:06:24:21 -0400]  
[purl.schreurprinting.com/sid#183ecd8][rid#1836238/initial] (2) local  
path result: /volumes/raider/webserver/documents/dev/ 
schreurprinting.com/p.php
192.168.0.253 - - [05/Sep/2008:06:24:21 -0400]  
[purl.schreurprinting.com/sid#183ecd8][rid#1836238/initial] (1) go- 
ahead with /volumes/raider/webserver/documents/dev/schreurprinting.com/ 
p.php [OK]
192.168.0.253 - - [05/Sep/2008:06:24:21 -0400]  
[purl.schreurprinting.com/sid#183ecd8][rid#1836238/initial] (3) [per- 
dir /volumes/raider/webserver/documents/] strip per-dir prefix: / 
volumes/raider/webserver/documents/dev/schreurprinting.com/p.php ->  
dev/schreurprinting.com/p.php
192.168.0.253 - - [05/Sep/2008:06:24:21 -0400]  
[purl.schreurprinting.com/sid#183ecd8][rid#1836238/initial] (3) [per- 
dir /volumes/raider/webserver/documents/] applying pattern 'Google' to  
uri 'dev/schreurprinting.com/p.php'
192.168.0.253 - - [05/Sep/2008:06:24:21 -0400]  
[purl.schreurprinting.com/sid#183ecd8][rid#1836238/initial] (1) [per- 
dir /volumes/raider/webserver/documents/] pass through /volumes/raider/ 
webserver/documents/dev/schreurprinting.com/p.php
192.168.0.253 - - [05/Sep/2008:06:24:22 -0400]  
[purl.schreurprinting.com/sid#183ecd8][rid#1836238/initial] (2) init  
rewrite engine with requested uri /favicon.ico
192.168.0.253 - - [05/Sep/2008:06:24:22 -0400]  
[purl.schreurprinting.com/sid#183ecd8][rid#1836238/initial] (3)  
applying pattern '/(.*)' to uri '/favicon.ico'
192.168.0.253 - - [05/Sep/2008:06:24:22 -0400]  
[purl.schreurprinting.com/sid#183ecd8][rid#1836238/initial] (2)  
rewrite /favicon.ico -> /volumes/raider/webserver/documents/dev/ 
schreurprinting.com/p.php?purl=favicon.ico&edit=
192.168.0.253 - - [05/Sep/2008:06:24:22 -0400]  
[purl.schreurprinting.com/sid#183ecd8][rid#1836238/initial] (3) split  
uri=/volumes/raider/webserver/documents/dev/schreurprinting.com/p.php? 
purl=favicon.ico&edit= -> uri=/volumes/raider/webserver/documents/dev/ 
schreurprinting.com/p.php, args=purl=favicon.ico&edit=
192.168.0.253 - - [05/Sep/2008:06:24:22 -0400]  
[purl.schreurprinting.com/sid#183ecd8][rid#1836238/initial] (2) local  
path result: /volumes/raider/webserver/documents/dev/ 
schreurprinting.com/p.php
192.168.0.253 - - [05/Sep/2008:06:24:22 -0400]  
[purl.schreurprinting.com/sid#183ecd8][rid#1836238/initial] (1) go- 
ahead with /volumes/raider/webserver/documents/dev/schreurprinting.com/ 
p.php [OK]
192.168.0.253 - - [05/Sep/2008:06:24:22 -0400]  
[purl.schreurprinting.com/sid#183ecd8][rid#1836238/initial] (3) [per- 
dir /volumes/raider/webserver/documents/] strip per-dir prefix: / 
volumes/raider/webserver/documents/dev/schreurprinting.com/p.php ->  
dev/schreurprinting.com/p.php
192.168.0.253 - - [05/Sep/2008:06:24:22 -0400]  
[purl.schreurprinting.com/sid#183ecd8][rid#1836238/initial] (3) [per- 
dir /volumes/raider/webserver/documents/] applying pattern 'Google' to  
uri 'dev/schreurprinting.com/p.php'
192.168.0.253 - - [05/Sep/2008:06:24:22 -0400]  
[purl.schreurprinting.com/sid#183ecd8][rid#1836238/initial] (1) [per- 
dir /volumes/raider/webserver/documents/] pass through /volumes/raider/ 
webserver/documents/dev/schreurprinting.com/p.php


Thank you for taking the time to read this!


--

Jason Pruim
Raoset Inc.
Technology Manager
MQC Specialist
11287 James St
Holland, MI 49424
www.raoset.com
japruim@raoset.com




_______________________________________________
Do not post admin requests to the list. They will be ignored.
Macos-x-server mailing list      (Macos-x-server@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/macos-x-server/japruim%40raoset.com

This email sent to japruim@raoset.com
--

Jason Pruim
Raoset Inc.
Technology Manager
MQC Specialist
11287 James St
Holland, MI 49424
www.raoset.com
japruim@raoset.com





Re: [users@httpd] Virtual hosts and mod_rewrite

Posted by Jason Pruim <ja...@raoset.com>.
On Sep 8, 2008, at 7:32 AM, Jason Pruim wrote:

>
> On Sep 8, 2008, at 7:12 AM, Eric Covener wrote:
>
>> On Mon, Sep 8, 2008 at 6:09 AM, Jason Pruim <ja...@raoset.com>  
>> wrote:
>>
>>> Locally it works great.. Once.. As soon as the web page is loaded   
>>> and you
>>> attempt to refresh or go to a different page, it says "Forbidden  
>>> you do not
>>> have permission to access /jasonpruim112 on this server"
>>
>> Is there an error log entry corresponding to the error?
>
> In typical fashion... when I tried to reproduce it, I'm not getting  
> any issues with it crashing apache now... BUT... I did notice a new  
> problem... There are a few links inside that site that would will  
> navigate through, and I need to pass the variable along with it...  
> in other words, they go to this page: HTTP://purl.schreurprinting.com/jasonpruim112 
>  and then navigate to HTTP://purl.schreurprinting.com/mail.php/jasonpruim112 
>  (Or HTTP://purl.schreurprinting.com/jasonpruim112 which is  
> rewritten to http://purl.schreurprinting.com/mail.php?purl=jasonpruim112)
>
> So it's back to the old drawing board... :)
>


Apparently I spoke too soon.... Here is the access log:

192.168.0.253 - - [08/Sep/2008:07:51:48 -0400] "GET /purl/mail.php? 
purl=jasonpruim112 HTTP/1.1" 403 304

And here is the rewrite log for that entry:
BEGIN ERROR LOG
192.168.0.253 - - [08/Sep/2008:07:51:48 -0400]  
[purl.schreurprinting.com/sid#183ecd8][rid#1836238/initial] (2) init  
rewrite engine with requested uri /purl/mail.php
192.168.0.253 - - [08/Sep/2008:07:51:48 -0400]  
[purl.schreurprinting.com/sid#183ecd8][rid#1836238/initial] (3)  
applying pattern '/(.*)' to uri '/purl/mail.php'
192.168.0.253 - - [08/Sep/2008:07:51:48 -0400]  
[purl.schreurprinting.com/sid#183ecd8][rid#1836238/initial] (2)  
rewrite /purl/mail.php -> /volumes/raider/webserver/documents/dev/ 
schreurprinting.com/p.php?purl=purl/mail.php&edit=
192.168.0.253 - - [08/Sep/2008:07:51:48 -0400]  
[purl.schreurprinting.com/sid#183ecd8][rid#1836238/initial] (3) split  
uri=/volumes/raider/webserver/documents/dev/schreurprinting.com/p.php? 
purl=purl/mail.php&edit= -> uri=/volumes/raider/webserver/documents/ 
dev/schreurprinting.com/p.php, args=purl=purl/mail.php&edit=
192.168.0.253 - - [08/Sep/2008:07:51:48 -0400]  
[purl.schreurprinting.com/sid#183ecd8][rid#1836238/initial] (2) local  
path result: /volumes/raider/webserver/documents/dev/ 
schreurprinting.com/p.php
192.168.0.253 - - [08/Sep/2008:07:51:48 -0400]  
[purl.schreurprinting.com/sid#183ecd8][rid#1836238/initial] (1) go- 
ahead with /volumes/raider/webserver/documents/dev/schreurprinting.com/ 
p.php [OK]
192.168.0.253 - - [08/Sep/2008:07:51:48 -0400]  
[purl.schreurprinting.com/sid#183ecd8][rid#1836238/initial] (2) init  
rewrite engine with requested uri /favicon.ico
192.168.0.253 - - [08/Sep/2008:07:51:48 -0400]  
[purl.schreurprinting.com/sid#183ecd8][rid#1836238/initial] (3)  
applying pattern '/(.*)' to uri '/favicon.ico'
192.168.0.253 - - [08/Sep/2008:07:51:48 -0400]  
[purl.schreurprinting.com/sid#183ecd8][rid#1836238/initial] (2)  
rewrite /favicon.ico -> /volumes/raider/webserver/documents/dev/ 
schreurprinting.com/p.php?purl=favicon.ico&edit=
192.168.0.253 - - [08/Sep/2008:07:51:48 -0400]  
[purl.schreurprinting.com/sid#183ecd8][rid#1836238/initial] (3) split  
uri=/volumes/raider/webserver/documents/dev/schreurprinting.com/p.php? 
purl=favicon.ico&edit= -> uri=/volumes/raider/webserver/documents/dev/ 
schreurprinting.com/p.php, args=purl=favicon.ico&edit=
192.168.0.253 - - [08/Sep/2008:07:51:48 -0400]  
[purl.schreurprinting.com/sid#183ecd8][rid#1836238/initial] (2) local  
path result: /volumes/raider/webserver/documents/dev/ 
schreurprinting.com/p.php
192.168.0.253 - - [08/Sep/2008:07:51:48 -0400]  
[purl.schreurprinting.com/sid#183ecd8][rid#1836238/initial] (1) go- 
ahead with /volumes/raider/webserver/documents/dev/schreurprinting.com/ 
p.php [OK]


There is nor error_log entry that is created for this... So I hope  
that is the right info.

Thanks for looking!


--

Jason Pruim
Raoset Inc.
Technology Manager
MQC Specialist
11287 James St
Holland, MI 49424
www.raoset.com
japruim@raoset.com





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


Re: [users@httpd] Virtual hosts and mod_rewrite

Posted by Jason Pruim <ja...@raoset.com>.
On Sep 8, 2008, at 7:12 AM, Eric Covener wrote:

> On Mon, Sep 8, 2008 at 6:09 AM, Jason Pruim <ja...@raoset.com>  
> wrote:
>
>> Locally it works great.. Once.. As soon as the web page is loaded   
>> and you
>> attempt to refresh or go to a different page, it says "Forbidden  
>> you do not
>> have permission to access /jasonpruim112 on this server"
>
> Is there an error log entry corresponding to the error?

In typical fashion... when I tried to reproduce it, I'm not getting  
any issues with it crashing apache now... BUT... I did notice a new  
problem... There are a few links inside that site that would will  
navigate through, and I need to pass the variable along with it... in  
other words, they go to this page: HTTP://purl.schreurprinting.com/jasonpruim112 
  and then navigate to HTTP://purl.schreurprinting.com/mail.php/jasonpruim112 
  (Or HTTP://purl.schreurprinting.com/jasonpruim112 which is rewritten  
to http://purl.schreurprinting.com/mail.php?purl=jasonpruim112)

So it's back to the old drawing board... :)


>
>
> -- 
> Eric Covener
> covener@gmail.com
>
> ---------------------------------------------------------------------
> 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
>
>

--

Jason Pruim
Raoset Inc.
Technology Manager
MQC Specialist
11287 James St
Holland, MI 49424
www.raoset.com
japruim@raoset.com





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


Re: [users@httpd] Virtual hosts and mod_rewrite

Posted by Eric Covener <co...@gmail.com>.
On Mon, Sep 8, 2008 at 6:09 AM, Jason Pruim <ja...@raoset.com> wrote:

> Locally it works great.. Once.. As soon as the web page is loaded  and you
> attempt to refresh or go to a different page, it says "Forbidden you do not
> have permission to access /jasonpruim112 on this server"

Is there an error log entry corresponding to the error?

-- 
Eric Covener
covener@gmail.com

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