|
| 1 | +ServerName localhost |
| 2 | + |
| 3 | +<VirtualHost *:80> |
| 4 | + ServerName pccd.dites.cat |
| 5 | + AddDefaultCharset utf-8 |
| 6 | + AddCharset utf-8 .css .js .svg .xml |
| 7 | + DocumentRoot /srv/app/docroot |
| 8 | + ErrorDocument 400 /400.html |
| 9 | + ErrorDocument 401 /401.html |
| 10 | + ErrorDocument 403 /403.html |
| 11 | + ErrorDocument 404 /404.html |
| 12 | + ErrorDocument 500 /500.html |
| 13 | + FileETag None |
| 14 | + ErrorLog /var/log/apache2/error.log |
| 15 | + CustomLog /var/log/apache2/access.log combined |
| 16 | + |
| 17 | + <Directory "/srv/app/docroot"> |
| 18 | + Require all granted |
| 19 | + AllowOverride None |
| 20 | + </Directory> |
| 21 | + |
| 22 | + # Route all non-file requests to index.php (routing handled in PHP). |
| 23 | + FallbackResource /index.php |
| 24 | + |
| 25 | + <IfModule mod_headers.c> |
| 26 | + Header always set Cross-Origin-Opener-Policy "same-origin" |
| 27 | + Header always set Strict-Transport-Security "max-age=31536000" |
| 28 | + Header always set X-Content-Type-Options "nosniff" |
| 29 | + |
| 30 | + <FilesMatch "(?i)\.(avif|css|gif|ico|jpg|js|mp3|png|svg|webp)$"> |
| 31 | + Header set Cache-Control "public, max-age=31536000, immutable" |
| 32 | + </FilesMatch> |
| 33 | + </IfModule> |
| 34 | + |
| 35 | + <IfModule mod_filter.c> |
| 36 | + <IfModule mod_brotli.c> |
| 37 | + AddOutputFilterByType BROTLI_COMPRESS application/javascript |
| 38 | + AddOutputFilterByType BROTLI_COMPRESS application/json |
| 39 | + AddOutputFilterByType BROTLI_COMPRESS application/xml |
| 40 | + AddOutputFilterByType BROTLI_COMPRESS image/svg+xml |
| 41 | + AddOutputFilterByType BROTLI_COMPRESS text/css |
| 42 | + AddOutputFilterByType BROTLI_COMPRESS text/html |
| 43 | + AddOutputFilterByType BROTLI_COMPRESS text/javascript |
| 44 | + AddOutputFilterByType BROTLI_COMPRESS text/plain |
| 45 | + AddOutputFilterByType BROTLI_COMPRESS text/xml |
| 46 | + </IfModule> |
| 47 | + |
| 48 | + <IfModule mod_deflate.c> |
| 49 | + AddOutputFilterByType DEFLATE application/javascript |
| 50 | + AddOutputFilterByType DEFLATE application/json |
| 51 | + AddOutputFilterByType DEFLATE application/xml |
| 52 | + AddOutputFilterByType DEFLATE image/svg+xml |
| 53 | + AddOutputFilterByType DEFLATE text/css |
| 54 | + AddOutputFilterByType DEFLATE text/html |
| 55 | + AddOutputFilterByType DEFLATE text/javascript |
| 56 | + AddOutputFilterByType DEFLATE text/plain |
| 57 | + AddOutputFilterByType DEFLATE text/xml |
| 58 | + </IfModule> |
| 59 | + </IfModule> |
| 60 | +</VirtualHost> |
0 commit comments