ansible/roles/webserver/files/etc/apache2/sites-available/thunix.tilde.chat.conf

32 lines
1.0 KiB
Plaintext

<VirtualHost *:80>
ServerAdmin webmaster@thunix.net
ServerName thunix.tilde.chat thunix.tilde
DocumentRoot /var/www/thunix.cf
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
<Directorymatch "^/.*/\.git/">
Order deny,allow
Deny from all
</Directorymatch>
RewriteEngine on
RewriteCond %{SERVER_NAME} =thunix.tilde.chat
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
</VirtualHost>
<IfModule mod_ssl.c>
<VirtualHost *:443>
ServerAdmin webmaster@thunix.net
ServerName thunix.tilde.chat
DocumentRoot /var/www/thunix.cf
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
<Directorymatch "^/.*/\.git/">
Order deny,allow
Deny from all
</Directorymatch>
SSLCertificateFile /etc/letsencrypt/live/thunix.tilde.chat/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/thunix.tilde.chat/privkey.pem
Include /etc/letsencrypt/options-ssl-apache.conf
</VirtualHost>
</IfModule>