Products

Automatic redirect for SSL configuration

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

Stroebele Timothy

Leave a Reply

This article first appeared on the Siemens Digital Industries Software blog at https://blogs.sw.siemens.com/polarion/automatic-redirect-for-ssl-configuration/