Mark Montague wrote:

> On December 8, 2011 5:56 , "Helmut Schneider" <jumpe...@gmx.de> wrote:
> > Do I also need to configure RewriteLog within the VHOST?! Is that
> > also  a "Rewrite configuration"?! Because only setting
> > RewriteEngine On does  not write a logfile...
> 
> Did you read the documentation?

Sure, but I might miss the forest through the trees.

> https://httpd.apache.org/docs/2.2/mod/mod_rewrite.html#rewriteengine

Read it again, also
https://httpd.apache.org/docs/2.2/mod/mod_rewrite.html#rewritelog,
still unsure.

> "Context: server config, virtual host"
> "The directive should occur only once per server config."
> "If the name does not begin with a slash ('|/|') then it is assumed
> to be relative to the /Server Root/."
> 
> If you are using RewriteLog in the server context but are not seeing
> a log file:

If I specify RewriteLog within the server context it does not write the
logfile. If I specify RewriteLog within the virtual host context, it
does. RewriteLog is the only option I change, I do not touch any other
options.

> - What is the value you have for RewriteLogLevel?

2, specified in both, the server and the vhost context.

> Are you looking in the right place?

I hope so. The vhost context is just ~20 lines below the server context.

> (Does the log file name begin with a slash?)

Yes.

> - Does Apache HTTP Server have permission to open and
> write the log file in the place you have specified?

Sure. As mentioned before, when specifiying the (no doubt identical)
directive within the vhost it works like a charm.

> - Are there error messages about creating/opening the log file
> in your web server error log file?

No. But see above.

Server context:
RewriteEngine on
RewriteLog /var/www/logs/rewrite.log
RewriteLogLevel 2

Vhost context:
RewriteEngine on
#RewriteLog /var/www/logs/rewrite.log
RewriteLogLevel 2
$some_conditions_and_rules

=> Rewrite works, logging does not.

Server context:
RewriteEngine on
(#)RewriteLog /var/www/logs/rewrite.log
RewriteLogLevel 2

Vhost context:
RewriteEngine on
RewriteLog /var/www/logs/rewrite.log
RewriteLogLevel 2
$some_conditions_and_rules

=> Rewrite works, so does logging.
Also removed the "<IfModule mod_rewrite.c>" tags, no difference.


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

Reply via email to