Introduction
Use the following procedure to debug rewrite issues encountered when using Apache.
Procedure
In order to enable rewrite trace logs, the LogLevel directive must be used.
The most effective context to use the LogLevel directive is the VirtualHost context.
Due to this requirement, you will need to set up a VirtualHost include for the affected domain with the following instructions:
How to use Apache includes to add configuration directives to a specific domain's virtualhost
Once the VirtualHost include is set up for the domain add the following directive to the include file for both the std and ssl version of the include:
LogLevel alert rewrite:trace8
Restart Apache to ensure the change is picked up:
/scripts/restartsrv_apache
You may then follow the log and filter everything out except for the rewrite logs with the following command:
tail -fn0 /etc/apache2/logs/error_log | grep '[rewrite:'
And finally to see the logs, visit the domain that is experiencing the redirect issue.
Comments
0 comments
Article is closed for comments.