# Apache reverse proxy — TicketGate # Install: # sudo cp deploy/ticket-gate.apache.conf /etc/apache2/sites-available/ticket-gate.conf # sudo a2enmod proxy proxy_http headers rewrite ssl # sudo a2ensite ticket-gate.conf # sudo systemctl reload apache2 # # SSL: si OVH termine le TLS en amont, adapter ou n'exposer que :80 en interne. # Pour Let's Encrypt local: certbot --apache -d ticket-gate.sitecreateur.fr ServerName ticket-gate.sitecreateur.fr RewriteEngine On RewriteCond %{HTTPS} off RewriteRule ^/(.*)$ https://%{HTTP_HOST}/$1 [R=301,L] ErrorLog ${APACHE_LOG_DIR}/ticket-gate-error.log CustomLog ${APACHE_LOG_DIR}/ticket-gate-access.log combined ServerName ticket-gate.sitecreateur.fr SSLEngine on # Remplacer par certificat Let's Encrypt ou certificat OVH si terminé ici SSLCertificateFile /etc/ssl/certs/ssl-cert-snakeoil.pem SSLCertificateKeyFile /etc/ssl/private/ssl-cert-snakeoil.key ProxyPreserveHost On ProxyRequests Off RequestHeader set X-Forwarded-Proto "https" RequestHeader set X-Forwarded-For %{REMOTE_ADDR}s ProxyPass / http://127.0.0.1:3847/ ProxyPassReverse / http://127.0.0.1:3847/ ErrorLog ${APACHE_LOG_DIR}/ticket-gate-error.log CustomLog ${APACHE_LOG_DIR}/ticket-gate-access.log combined # vim: syntax=apache ts=4 sw=4 sts=4 sr noet