31 lines
895 B
Plaintext
31 lines
895 B
Plaintext
<VirtualHost *:80>
|
|
ServerName gitea.example.net
|
|
|
|
ErrorLog ${APACHE_LOG_DIR}/gitea-error.log
|
|
CustomLog ${APACHE_LOG_DIR}/gitea-access.log combined
|
|
|
|
RewriteEngine On
|
|
RewriteCond %{HTTPS} off
|
|
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
|
|
RewriteCond %{SERVER_NAME} =gitea.example.net
|
|
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
|
|
</VirtualHost>
|
|
|
|
<VirtualHost *:443>
|
|
ServerName gitea.example.net
|
|
DocumentRoot /var/www/html
|
|
|
|
ErrorLog ${APACHE_LOG_DIR}/gitea-error.log
|
|
CustomLog ${APACHE_LOG_DIR}/gitea-access.log combined
|
|
|
|
SSLProxyEngine On
|
|
ProxyPreserveHost On
|
|
AllowEncodedSlashes NoDecode
|
|
ProxyPass / http://localhost:3000/ nocanon ttl=15 retry=0
|
|
|
|
SSLEngine on
|
|
SSLCertificateFile /etc/letsencrypt/live/gitea.exapmel.net/fullchain.pem
|
|
SSLCertificateKeyFile /etc/letsencrypt/live/gitea.exapmel.net/privkey.pem
|
|
SSLProtocol TLSv1.3
|
|
</VirtualHost>
|