Hello tous.
Gitlab propose son propre serveur web et ne devrait pas passer par Apache.
Pour mettre gitlab sous un sous-domaine, il faut éditer le fichier /etc/gtilab/gitlab.rb et mettre
external_url 'http://monsousdomaine.domaine.com/'
puis tu redémarres gitlab :
gitlab-ctl reconfigure
Et virer toutes les références à monsousdomaine.domaine.com dans apache.
Solution 2 (plus sale) avec apache
dans le /etc/gtilab/gitlab.rb tu mets un port différent
external_url 'http://www.domaine.com:8901/'
puis tu redémarres gitlab :
gitlab-ctl reconfigure
Et tu crées un virtualhost apache, dans /etc/apache2/sites-available/gitlab.conf :
<VirtualHost *:80 >
ServerName monsousdomaine.domaine.com
ProxyPreserveHost On
ProxyRequests On
ProxyPass / http://www.domaine.com:8901/
ProxyPassReverse / http://www.domaine.com:8901/
</VirtualHost>
Tu l'enable
a2ensite gitlab
Et tu redémarres apache
systemctl restart apache2
(pour du Debian, si autre distrib, il faut adapter les chemins et les noms de service)