use public_html fallback

This commit is contained in:
Nycki 2024-12-28 00:40:27 +00:00
parent 6940dce6e7
commit 80a6b8f15b

View file

@ -32,14 +32,23 @@
</If>
DocumentRoot /data/nycki.net/site
ErrorDocument 404 404.html
ErrorDocument 404 /404.html
RewriteEngine on
#LogLevel alert rewrite:trace3
RewriteCond "%{DOCUMENT_ROOT}/%{REQUEST_URI}" -f
RewriteRule "(.+)" "/$1" [L]
<Directory />
Options FollowSymLinks MultiViews
Require all granted
</Directory>
Alias /p /home/nycki/public_html
<Directory /home/nycki/public_html
# If file isn't in repo, fall back on public_html
Define public_html "/home/nycki/public_html"
Alias /p ${public_html}
RewriteCond "${public_html}/%{REQUEST_URI}" -f
RewriteRule "(.+)" "/p/$1" [PT,L]
<Directory ${public_html}>
Options FollowSymLinks
Require all granted
</Directory>