diff options
Diffstat (limited to 'server-build/assets/wordpress.conf')
-rw-r--r-- | server-build/assets/wordpress.conf | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/server-build/assets/wordpress.conf b/server-build/assets/wordpress.conf new file mode 100644 index 0000000..983cedf --- /dev/null +++ b/server-build/assets/wordpress.conf @@ -0,0 +1,25 @@ +# wordpress.conf +# The following Apache2 .conf file will accept connections on ports 80 (http) or 443 (https). +# +# Connections on port 80 will be redirected to 443. Please make sure to change the path to your +# SSL certificate and key. If you are using LetsEncrypt, this probably means changing +# _domain.com_ in the path only. Also change the _ServerName_ directive to match your domain name. + +<VirtualHost *:80> + RewriteEngine On + RewriteCond %{HTTPS} off + RewriteRule (.*) https://%{SERVER_NAME}/$1 [R,L] +</VirtualHost> + +<VirtualHost *:443> + SSLEngine on + # Edit the path to your SSL certificate and key here: + SSLCertificateFile /etc/letsencrypt/live/domain.com/fullchain.pem + SSLCertificateKeyFile /etc/letsencrypt/live/domain.com/privkey.pem + <Directory /var/www/wordpress/> + AllowOverride All + </Directory> + DocumentRoot /var/www/wordpress/ + # Add your server name here: + ServerName domain.com +</VirtualHost> |