blob: 983cedf77bffacd8a78d771d9fdc16f828a1ffd9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
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>
|