nycki.net/tools/site.conf
nycki 64f596e447
All checks were successful
/ build (push) Successful in 25s
add ssl back in
2024-12-28 02:45:38 +00:00

41 lines
1.4 KiB
Text

<VirtualHost *:80 *:443>
ServerName nycki.net
ServerAlias nycki.blokus.hatspace.net
SSLEngine on
Include /etc/letsencrypt/options-ssl-apache.conf
SSLCertificateFile /etc/letsencrypt/live/nycki.net/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/nycki.net/privkey.pem
# https://palmure.fr/blog.html#default-https-but-only-for-recent-browsers
#Header always add Strict-Transport-Security: "max-age=31536000; includeSubDomains; preload;"
# <If "%{HTTPS} == 'off'">
# <If "%{HTTP:Upgrade-Insecure-Requests} == 1">
# Header always add Vary: Upgrade-Insecure-Requests
# Redirect / https://nycki.net/
# </If>
# </If>
DocumentRoot /data/nycki.net/site
#DirectoryIndex index.html
ErrorDocument 404 /404.html
RewriteEngine on
LogLevel alert rewrite:trace3
RewriteCond "%{DOCUMENT_ROOT}/%{REQUEST_URI}" -f [OR]
RewriteCond "%{DOCUMENT_ROOT}/%{REQUEST_URI}" -d
RewriteRule "^(.+)" "%{DOCUMENT_ROOT}/$1" [L]
<Directory />
Options FollowSymLinks MultiViews
Require all granted
</Directory>
# If file isn't in repo, fall back on public_html
Define public_html "/home/nycki/public_html"
RewriteCond "${public_html}%{REQUEST_URI}" -f [OR]
RewriteCond "${public_html}%{REQUEST_URI}" -d
RewriteRule "^(.+)" "${public_html}$1" [L]
<Directory "${public_html}">
Options FollowSymLinks
Require all granted
</Directory>
</VirtualHost>