34 lines
993 B
Text
34 lines
993 B
Text
<VirtualHost *:80>
|
|
DocumentRoot /var/www/html/public
|
|
ServerName localhost
|
|
|
|
<Directory /var/www/html/public>
|
|
Options -Indexes +FollowSymLinks
|
|
AllowOverride All
|
|
Require all granted
|
|
</Directory>
|
|
|
|
# Deny access to src/ and migrations/
|
|
<Directory /var/www/html/src>
|
|
Require all denied
|
|
</Directory>
|
|
<Directory /var/www/html/migrations>
|
|
Require all denied
|
|
</Directory>
|
|
<Directory /var/www/html/data>
|
|
Require all denied
|
|
</Directory>
|
|
|
|
# HTML-Seiten nie cachen (damit neue ?v=-URLs sofort wirken)
|
|
<FilesMatch "\.php$">
|
|
Header set Cache-Control "no-cache, must-revalidate"
|
|
</FilesMatch>
|
|
|
|
# Statische Assets aggressiv cachen (Cache-Busting via ?v= in der URL)
|
|
<FilesMatch "\.(css|js)$">
|
|
Header set Cache-Control "public, max-age=31536000, immutable"
|
|
</FilesMatch>
|
|
|
|
ErrorLog ${APACHE_LOG_DIR}/error.log
|
|
CustomLog ${APACHE_LOG_DIR}/access.log combined
|
|
</VirtualHost>
|