Set up a normal HTTP site using VirtualHost as described here:
Installing Apache Webserver (Deprecated)
A typical Apache2 configuration file will look like, the content of the /etc/apache2/sites/available/000-default.conf :
<VirtualHost *:80>
ServerAdmin support@intland.com
DocumentRoot /var/www/
<Directory "/">
Options FollowSymLinks
AllowOverride None
Order allow,deny
allow from all
</Directory>
<Directory "/var/www">
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
ErrorLog /var/log/apache2/error.log
# Possible values include: debug, info, notice, warn, error, crit,alert, emerg.
LogLevel debug
CustomLog /var/log/apache2/access.log combined
ServerSignature On
Alias /doc/ "/usr/share/doc/"
# Error mapping
ErrorDocument 503 "This CodeBeamer server is under maintenance and not currently available. Please check again soon."
<Directory "/usr/share/doc/">
Options Indexes MultiViews FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
Allow from 127.0.0.0/255.0.0.0 ::1/128
</Directory>
SetEnvIf Request_URI "^/(svn)/.*$" no-jk
JkMountCopy On
JkAutoAlias /vol/CB/tomcat/webapps
JkMount /* ajp13
</VirtualHost>
Acquire an SSL certificate from an Certificate Authority
To set up SSL/HTTPS site for codeBeamer you need to acquire an SSL certificate.
Such SSL certificates can be bought from SSL certificate providers or even available for free from https://letsencrypt.org/.
See these tutorial as an example for requesting SSL certificates:
When you have acquired an SSL certificate you should have 3 certificate files:
- a private key like: codebeamer.com_private_key.key
- an SSL certificate file: codebeamer.com_ssl_certificate.cer
- an CA intermediate certificate: intermediate.cer
Put these 3 files to a new directory on your server, like /etc/apache2/certificates, and in the followings we will configure Apache to use them.
Configuring Apache to enable the HTTPS site
As you already have Apache running just must enable SSL and Rewrite Apache modules first.
Execute this:
sudo a2enmod ssl rewrite
Next to redirect all HTTP/non secure request to HTTPS add this to your existing Apache site configuration file which is /etc/sites/available/000-default.conf as default. So add these lines to inside of the </VirtualHost> section like this:
RewriteEngine On
RewriteCond %{HTTPS} !on
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
Next you want to create a new Apache configuration file which contains the configuration for HTTPS site.
Create a new file /etc/sites/available/https.conf and put something like this to that:
UPDATE the directory and file names in this configuration file to match with your installation directory!!
<VirtualHost *:443>
ServerAdmin support@intland.com
DocumentRoot /var/www/
<Directory "/">
</Directory>
ErrorLog /var/log/apache2/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel info
CustomLog /var/log/apache2/access.log combined
ServerSignature On
Alias /doc/ "/usr/share/doc/"
# Error mapping
ErrorDocument 503 "This CodeBeamer server is under maintenance and not currently available. Please check again soon."
SetEnvIf Request_URI "^/(svn)/.*$" no-jk
JkMountCopy On
## UPDATE to point your codeBeamer installation directory !
JkAutoAlias /vol/CB/tomcat/webapps
JkMount /* ajp13
#Include /etc/apache2/mods-available/update_site.conf
## SSL configuration
SSLEngine on
## UPDATE to point to location of your certificate files !
SSLCertificateFile /etc/apache2/certificates/codebeamer.com_ssl_certificate.cer
SSLCertificateKeyFile /etc/apache2/certificates/codebeamer.com_private_key.key
SSLCACertificateFile /etc/apache2/certificates/intermediate.cer
SSLProtocol ALL -SSLv2 -SSLv3
SSLHonorCipherOrder On
SSLCipherSuite ECDH+AESGCM:DH+AESGCM:ECDH+AES256:DH+AES256:ECDH+AES128:DH+AES:RSA+AESGCM:RSA+AES:!aNULL:!MD5:!DSS
</VirtualHost>
After the "https.conf" file is ready enabled that and restart Apache using these commands.
sudo a2ensite https.conf
sudo service apache2 restart
If everything goes well your HTTPS site should be ready now.
Verify HTTPS and Certificate
Use this site to verify your SSL certificate is installed correctly:
https://www.ssllabs.com/ssltest/
If everything goes well you should see a nice result like this :