# Configuration Apache pour GitLab
# À placer dans /etc/apache2/sites-available/gitlab.conf
# Puis activer avec: sudo a2ensite gitlab.conf
ServerName chillka.example.com # Remplacer par votre domaine ou IP
# Redirection vers HTTPS (décommenter après configuration SSL)
# Redirect permanent / https://chillka.example.com/
ProxyPreserveHost On
ProxyRequests off
# Autoriser les requêtes proxy
Require all granted
# Proxy vers GitLab
ProxyPass / http://127.0.0.1:80/
ProxyPassReverse / http://127.0.0.1:80/
# Headers pour GitLab
RequestHeader set X-Forwarded-Proto "http"
RequestHeader set X-Forwarded-Ssl "off"
# Headers supplémentaires pour GitLab
RequestHeader set X-Real-IP %{REMOTE_ADDR}s
RequestHeader set X-Forwarded-For %{REMOTE_ADDR}s
# Logs
ErrorLog ${APACHE_LOG_DIR}/gitlab_error.log
CustomLog ${APACHE_LOG_DIR}/gitlab_access.log combined
# Configuration HTTPS (décommenter après avoir configuré SSL avec certbot)
#
# ServerName chillka.example.com
#
# # SSL Configuration
# SSLEngine on
# SSLCertificateFile /etc/letsencrypt/live/chillka.example.com/fullchain.pem
# SSLCertificateKeyFile /etc/letsencrypt/live/chillka.example.com/privkey.pem
# SSLCertificateChainFile /etc/letsencrypt/live/chillka.example.com/chain.pem
#
# # Protocols et ciphers
# SSLProtocol all -SSLv2 -SSLv3
# SSLCipherSuite HIGH:!aNULL:!MD5
#
# ProxyPreserveHost On
# ProxyRequests off
#
#
# Require all granted
#
#
# ProxyPass / http://127.0.0.1:80/
# ProxyPassReverse / http://127.0.0.1:80/
#
# # Headers pour GitLab avec HTTPS
# RequestHeader set X-Forwarded-Proto "https"
# RequestHeader set X-Forwarded-Ssl "on"
# RequestHeader set X-Real-IP %{REMOTE_ADDR}s
# RequestHeader set X-Forwarded-For %{REMOTE_ADDR}s
#
# # Logs
# ErrorLog ${APACHE_LOG_DIR}/gitlab_ssl_error.log
# CustomLog ${APACHE_LOG_DIR}/gitlab_ssl_access.log combined
#