Archive for the ‘Apache’ Category

Log-Rotation for Apache

Sunday, July 13th, 2008

The following statement will enable log rotation for Apache. The command is specified for installation in a Windows system. Please check paths for you own installation.
CustomLog “|C:/Polarion3.1.1/bundled/apache_2.0.59/bin/rotatelogs.exe C:/Polarion3.1.1/data/logs/apache/access.log 60″ common

Log rotation works by a pipe to the rotatelogs.exe, which itself can be configured to rotate logs by time or by size. Try rotatelogs -? to get help.

The given statement is suitable for the access log file, which receive most of the log output. Look for further log configuration in httpd.conf and adopt them appropriately to rotate all Apache log files.

Best Wishes
Matthias

Automatic redirect for SSL configuration

Sunday, July 13th, 2008

If you switch on SSL, users have to type the URL beginning with https://<server name> /Polarion. If they miss the “https”, they will not reach the page. You can help your users with an automatic redirect in the Apache configuration.

httpd.conf

remove the comment on the line:
LoadModule rewrite_module modules/mod_rewrite.so

Locate the following statement:
Listen 80

Add the following statements:
Listen 8888

The port 8888 will be used for communication between Apache and Polarion, since Polarion is not able to use SSL. In ssl.conf the access to this port is limited to localhost.

ssl.conf:
Append the following section to the file:

#– rewrite the standard page to the ssl page
<IfModule mod_rewrite.c>
RewriteEngine on
#RewriteLog “path to logfile”
#RewriteLogLevel 9

####
# Only apply the rules, if the port is not SSL (443)
# or the local port (8888)
####

ReWriteCond %{SERVER_PORT} (443||8888)$

####
# Redirect only access to repo and Polarion to the
# SSL port. The other stuff is not sensitive and can
# remain on the old port.
####

RewriteRule (repo/.*) https://%{HTTP_HOST}/$1 [NC,L]
RewriteRule (polarion/.*) https://%{HTTP_HOST}/$1 [NC,L]
</IfModule>

Best Wishes
Matthias