<VirtualHost project.<mydomain>:443>
 ServerName project.<mydomain>

 SSLEngine on
 SSLCertificateKeyFile /etc/apache2/myssl/server.cert.key
 SSLCertificateFile /etc/apache2/myssl/server.cert.crt

 DocumentRoot /var/www/redmine
 ServerAdmin nico@<mydomain>
 LogLevel warn
 ErrorLog /var/log/apache2/redmine_error
 CustomLog /var/log/apache2/redmine_access combined
 <Directory /var/www/redmine>
     Options Indexes FollowSymLinks MultiViews
     AllowOverride None
     Order allow,deny
     allow from all
     RailsBaseURI /redmine
     RailsEnv production
     PassengerResolveSymlinksInDocumentRoot on
 </Directory>
</VirtualHost>

<VirtualHost project.<mydomain>:80>
  #NameVirtualHost project.<mydomain>:80
  ServerName project.<mydomain>
  RewriteEngine On
  RewriteCond %{HTTPS} off
  RewriteRule (.*) https://project.<mydomain>%{REQUEST_URI}
</VirtualHost>

<VirtualHost git.<mydomain>:80>
  NameVirtualHost git.<mydomain>:80
  ServerName git.<mydomain>
  RewriteEngine On
  RewriteCond %{HTTPS} off
  RewriteRule (.*) https://git.<mydomain>%{REQUEST_URI}
</VirtualHost>


<VirtualHost git.<mydomain>:443>
    ServerName git.<mydomain>
    NameVirtualHost git.<mydomain>:443

    ServerAdmin nico@<mydomain>
    DocumentRoot /home/gitlab/gitlab/public

    SSLEngine on
    SSLCertificateKeyFile /etc/apache2/myssl/git/git.key
    SSLCertificateFile /etc/apache2/myssl/git/git.crt

    <Directory "/home/gitlab/gitlab/public">
        Options -MultiViews
        AllowOverride all
    </Directory>
</VirtualHost>
