reminder/apache_sample_config.conf

47 lines
1.7 KiB
Text
Raw Normal View History

<VirtualHost *:80>
ServerAdmin postmaster@finnchristiansen.de
DocumentRoot /var/www/vhosts/reminder.pimux.de
ServerName reminder.pimux.de
ErrorLog ${APACHE_LOG_DIR}/reminder.pimux.de_error.log
CustomLog ${APACHE_LOG_DIR}/reminder.pimux.de_access.log combined
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteCond %{REQUEST_URI} !^/\.well-known/acme-challenge/.*
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
RewriteCond %{SERVER_NAME} =reminder.pimux.de
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
</VirtualHost>
<VirtualHost *:443>
ServerAdmin postmaster@finnchristiansen.de
ServerName reminder.pimux.de
DocumentRoot /var/www/vhosts/reminder.pimux.de/
ErrorLog ${APACHE_LOG_DIR}/reminder.pimux.de_error.log
CustomLog ${APACHE_LOG_DIR}/reminder.pimux.de_access.log combined
2018-12-30 09:24:29 +01:00
SetEnv SECRET_KEY secret
WSGIDaemonProcess reminder user=www-data group=www-data threads=5
WSGIScriptAlias / /var/www/vhosts/reminder.pimux.de/reminder.wsgi
WSGIScriptReloading On
WSGIPassAuthorization On
Alias /static/ /var/www/vhosts/reminder.pimux.de/app/static/
<Directory /var/www/vhosts/reminder.pimux.de/>
WSGIProcessGroup reminder
WSGIApplicationGroup %{GLOBAL}
Order deny,allow
Allow from all
</Directory>
SSLEngine on
SSLCACertificateFile /etc/letsencrypt/live/reminder.pimux.de/chain.pem
SSLCertificateFile /etc/letsencrypt/live/reminder.pimux.de/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/reminder.pimux.de/privkey.pem
Include /etc/letsencrypt/options-ssl-apache.conf
</VirtualHost>