|
| 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_403.html |
| 10 | + ErrorDocument 403 /401_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 | + <IfModule mod_rewrite.c> |
| 23 | + RewriteEngine on |
| 24 | + RewriteRule ^/p/(.*)$ /index.php?paremiotipus=$1 [B,L,UnsafeAllow3F] |
| 25 | + RewriteRule ^/obra/(.*)$ /index.php?obra=$1 [B,L,UnsafeAllow3F] |
| 26 | + RewriteRule "^/credits$" "/index.php?credits" [L] |
| 27 | + RewriteRule "^/fonts$" "/index.php?fonts" [L] |
| 28 | + RewriteRule "^/instruccions$" "/index.php?instruccions" [L] |
| 29 | + RewriteRule "^/llibres$" "/index.php?llibres" [L] |
| 30 | + RewriteRule "^/projecte$" "/index.php?projecte" [L] |
| 31 | + RewriteRule "^/top100$" "/index.php?top100" [L] |
| 32 | + RewriteRule "^/top10000$" "/index.php?top10000" [L] |
| 33 | + RewriteRule ^/og/(.*)\.png$ /og.php?paremiotipus=$1 [B,L,UnsafeAllow3F] |
| 34 | + </IfModule> |
| 35 | + |
| 36 | + <IfModule mod_headers.c> |
| 37 | + Header always set Cross-Origin-Opener-Policy "same-origin" |
| 38 | + Header always set Strict-Transport-Security "max-age=31536000" |
| 39 | + Header always set X-Content-Type-Options "nosniff" |
| 40 | + |
| 41 | + <FilesMatch "(?i)\.(avif|css|gif|ico|jpg|jpeg|js|mp3|png|svg|webp)$"> |
| 42 | + Header set Cache-Control "public, max-age=31536000, immutable" |
| 43 | + </FilesMatch> |
| 44 | + </IfModule> |
| 45 | + |
| 46 | + <IfModule mod_filter.c> |
| 47 | + <IfModule mod_brotli.c> |
| 48 | + AddOutputFilterByType BROTLI_COMPRESS application/javascript |
| 49 | + AddOutputFilterByType BROTLI_COMPRESS application/json |
| 50 | + AddOutputFilterByType BROTLI_COMPRESS application/ld+json |
| 51 | + AddOutputFilterByType BROTLI_COMPRESS application/manifest+json |
| 52 | + AddOutputFilterByType BROTLI_COMPRESS application/xml |
| 53 | + AddOutputFilterByType BROTLI_COMPRESS image/svg+xml |
| 54 | + AddOutputFilterByType BROTLI_COMPRESS text/css |
| 55 | + AddOutputFilterByType BROTLI_COMPRESS text/html |
| 56 | + AddOutputFilterByType BROTLI_COMPRESS text/javascript |
| 57 | + AddOutputFilterByType BROTLI_COMPRESS text/plain |
| 58 | + AddOutputFilterByType BROTLI_COMPRESS text/xml |
| 59 | + </IfModule> |
| 60 | + |
| 61 | + <IfModule mod_deflate.c> |
| 62 | + AddOutputFilterByType DEFLATE application/javascript |
| 63 | + AddOutputFilterByType DEFLATE application/json |
| 64 | + AddOutputFilterByType DEFLATE application/ld+json |
| 65 | + AddOutputFilterByType DEFLATE application/manifest+json |
| 66 | + AddOutputFilterByType DEFLATE application/xml |
| 67 | + AddOutputFilterByType DEFLATE image/svg+xml |
| 68 | + AddOutputFilterByType DEFLATE text/css |
| 69 | + AddOutputFilterByType DEFLATE text/html |
| 70 | + AddOutputFilterByType DEFLATE text/javascript |
| 71 | + AddOutputFilterByType DEFLATE text/plain |
| 72 | + AddOutputFilterByType DEFLATE text/xml |
| 73 | + </IfModule> |
| 74 | + </IfModule> |
| 75 | +</VirtualHost> |
0 commit comments