mirror of
https://github.com/jessebot/tiny_personal_website.git
synced 2025-10-01 01:48:43 +00:00
50 lines
1.9 KiB
Text
50 lines
1.9 KiB
Text
<VirtualHost *:80>
|
|
ServerName example.com
|
|
ServerAdmin example_user@gmail.com
|
|
WSGIDaemonProcess example_process_name user=example_user group=example_group processes=1 threads=5
|
|
WSGIScriptAlias / /path/to/web/root/adapter.wsgi
|
|
|
|
<Directory /path/to/web/root>
|
|
WSGIProcessGroup example_group
|
|
WSGIApplicationGroup %{GLOBAL}
|
|
# comment out next two lines if getting "forbidden" errors
|
|
Order deny,allow
|
|
Allow from all
|
|
# uncomment if getting "forbidden" errors
|
|
# Require all granted
|
|
</Directory>
|
|
</VirtualHost>
|
|
|
|
# If you need want an SSL, which I recommend, then delete the above content
|
|
# and use the below as your starting point. You can use
|
|
# https://letsencrypt.org/howitworks/ to get a free SSL. Thanks, EFF <3
|
|
<VirtualHost *:80>
|
|
ServerName example.com
|
|
# rewriting things to force https traffic
|
|
RewriteEngine on
|
|
RewriteCond %{HTTPS} off
|
|
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
|
|
</VirtualHost>
|
|
<VirtualHost *:443>
|
|
ServerName example.com
|
|
ServerAdmin example_user@gmail.com
|
|
# ssl stuff, you can change these paths to where ever you keep your own SSL files
|
|
SSLEngine on
|
|
SSLProtocol all -SSLv2 -SSLv3
|
|
SSLCertificateFile /etc/letsencrypt/live/example.com/cert.pem
|
|
SSLCertificateKeyFile /etc/letsencrypt/live/example.com/privkey.pem
|
|
SSLCertificateChainFile /etc/letsencrypt/live/example.com/chain.pem
|
|
# wsgi stuff
|
|
WSGIDaemonProcess example_process_name user=example_user group=example_group processes=1 threads=5
|
|
WSGIScriptAlias / /path/to/web/root/adapter.wsgi
|
|
|
|
<Directory /path/to/web/root>
|
|
WSGIProcessGroup example_group
|
|
WSGIApplicationGroup %{GLOBAL}
|
|
# comment out next two lines if getting "forbidden" errors
|
|
Order deny,allow
|
|
Allow from all
|
|
# uncomment if getting "forbidden" errors
|
|
# Require all granted
|
|
</Directory>
|
|
</VirtualHost>
|