nycki.net/tools/site.conf

42 lines
1.4 KiB
Text
Raw Normal View History

2024-12-28 02:45:38 +00:00
<VirtualHost *:80 *:443>
2024-12-28 02:32:59 +00:00
ServerName nycki.net
ServerAlias nycki.blokus.hatspace.net
2024-12-28 02:45:38 +00:00
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
2024-12-24 19:13:18 +00:00
2024-12-28 02:31:17 +00:00
# https://palmure.fr/blog.html#default-https-but-only-for-recent-browsers
2024-12-27 23:59:47 +00:00
#Header always add Strict-Transport-Security: "max-age=31536000; includeSubDomains; preload;"
2024-12-28 02:45:38 +00:00
# <If "%{HTTPS} == 'off'">
# <If "%{HTTP:Upgrade-Insecure-Requests} == 1">
# Header always add Vary: Upgrade-Insecure-Requests
# Redirect / https://nycki.net/
# </If>
# </If>
2024-12-24 19:13:18 +00:00
2024-12-27 23:59:47 +00:00
DocumentRoot /data/nycki.net/site
2024-12-28 02:31:17 +00:00
#DirectoryIndex index.html
2024-12-28 00:40:27 +00:00
ErrorDocument 404 /404.html
RewriteEngine on
2024-12-28 02:31:17 +00:00
LogLevel alert rewrite:trace3
2024-12-28 00:40:27 +00:00
2024-12-28 02:31:17 +00:00
RewriteCond "%{DOCUMENT_ROOT}/%{REQUEST_URI}" -f [OR]
RewriteCond "%{DOCUMENT_ROOT}/%{REQUEST_URI}" -d
RewriteRule "^(.+)" "%{DOCUMENT_ROOT}/$1" [L]
2024-12-24 19:13:18 +00:00
<Directory />
Options FollowSymLinks MultiViews
Require all granted
</Directory>
2024-12-27 23:59:47 +00:00
2024-12-28 00:40:27 +00:00
# If file isn't in repo, fall back on public_html
Define public_html "/home/nycki/public_html"
2024-12-28 02:31:17 +00:00
RewriteCond "${public_html}%{REQUEST_URI}" -f [OR]
RewriteCond "${public_html}%{REQUEST_URI}" -d
RewriteRule "^(.+)" "${public_html}$1" [L]
<Directory "${public_html}">
2024-12-27 23:59:47 +00:00
Options FollowSymLinks
Require all granted
</Directory>
2024-12-24 19:13:18 +00:00
</VirtualHost>