56 lines
1.3 KiB
Plaintext
56 lines
1.3 KiB
Plaintext
<VirtualHost *:80>
|
|
ServerAdmin apache+web.dym.sh@dym.sh
|
|
ServerName web.dym.sh
|
|
|
|
DocumentRoot /var/www/web.dym.sh
|
|
<Directory "/var/www/web.dym.sh">
|
|
Options FollowSymLinks Indexes MultiViews
|
|
AllowOverride All
|
|
Order allow,deny
|
|
Allow from all
|
|
</Directory>
|
|
|
|
DirectoryIndex index.php index.html
|
|
AllowEncodedSlashes NoDecode
|
|
|
|
HostnameLookups Off
|
|
UseCanonicalName Off
|
|
ServerSignature On
|
|
|
|
RewriteEngine On
|
|
RewriteCond %{HTTPS} off
|
|
RewriteCond %{HTTP:X-Forwarded-Proto} !https
|
|
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
|
|
</VirtualHost>
|
|
|
|
|
|
<VirtualHost *:443>
|
|
ServerAdmin apache+web.dym.sh@dym.sh
|
|
ServerName web.dym.sh
|
|
|
|
DocumentRoot /var/www/web.dym.sh
|
|
<Directory "/var/www/web.dym.sh">
|
|
Options FollowSymLinks Indexes MultiViews
|
|
AllowOverride All
|
|
Order allow,deny
|
|
Allow from all
|
|
</Directory>
|
|
|
|
DirectoryIndex index.php index.html
|
|
AllowEncodedSlashes NoDecode
|
|
|
|
HostnameLookups Off
|
|
UseCanonicalName Off
|
|
ServerSignature On
|
|
|
|
SSLEngine on
|
|
Include /etc/letsencrypt/options-ssl-apache.conf
|
|
|
|
RewriteEngine On
|
|
RewriteCond %{HTTPS} off
|
|
RewriteCond %{HTTP:X-Forwarded-Proto} !https
|
|
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
|
|
SSLCertificateFile /etc/letsencrypt/live/dym.sh/fullchain.pem
|
|
SSLCertificateKeyFile /etc/letsencrypt/live/dym.sh/privkey.pem
|
|
</VirtualHost>
|