diff options
author | ArthurHoaro <arthur@hoa.ro> | 2020-11-10 10:45:05 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-10 10:45:05 +0100 |
commit | 7e78237fc9106f5f53802c36ce26be0b44938255 (patch) | |
tree | b685903d1acd5ebe46ffee83b5e8e653200a6f06 /doc | |
parent | 325cc8adadacef7c4d2d0aa2d26c9d87ce216058 (diff) | |
parent | 8a9796014ce6c842095a9d031c8cbf40da761e0f (diff) | |
download | Shaarli-7e78237fc9106f5f53802c36ce26be0b44938255.tar.gz Shaarli-7e78237fc9106f5f53802c36ce26be0b44938255.tar.zst Shaarli-7e78237fc9106f5f53802c36ce26be0b44938255.zip |
Merge pull request #1630 from ArthurHoaro/fix/apache-config
Reviewed Apache configuration
Diffstat (limited to 'doc')
-rw-r--r-- | doc/md/Server-configuration.md | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/doc/md/Server-configuration.md b/doc/md/Server-configuration.md index 5b8aff53..a49b6033 100644 --- a/doc/md/Server-configuration.md +++ b/doc/md/Server-configuration.md | |||
@@ -193,19 +193,24 @@ sudo nano /etc/apache2/sites-available/shaarli.mydomain.org.conf | |||
193 | Require all granted | 193 | Require all granted |
194 | </Directory> | 194 | </Directory> |
195 | 195 | ||
196 | <LocationMatch "/\."> | 196 | # BE CAREFUL: directives order matter! |
197 | # Prevent accessing dotfiles | ||
198 | RedirectMatch 404 ".*" | ||
199 | </LocationMatch> | ||
200 | 197 | ||
201 | <LocationMatch "\.(?:ico|css|js|gif|jpe?g|png)$"> | 198 | <FilesMatch ".*\.(?!(ico|css|js|gif|jpe?g|png|ttf|oet|woff2?)$)[^\.]*$"> |
199 | Require all denied | ||
200 | </FilesMatch> | ||
201 | |||
202 | <Files "index.php"> | ||
203 | Require all granted | ||
204 | </Files> | ||
205 | |||
206 | <FilesMatch "\.(?:ico|css|js|gif|jpe?g|png|ttf|oet|woff2)$"> | ||
202 | # allow client-side caching of static files | 207 | # allow client-side caching of static files |
203 | Header set Cache-Control "max-age=2628000, public, must-revalidate, proxy-revalidate" | 208 | Header set Cache-Control "max-age=2628000, public, must-revalidate, proxy-revalidate" |
204 | </LocationMatch> | 209 | </FilesMatch> |
210 | |||
205 | 211 | ||
206 | # serve the Shaarli favicon from its custom location | 212 | # serve the Shaarli favicon from its custom location |
207 | Alias favicon.ico /var/www/shaarli.mydomain.org/images/favicon.ico | 213 | Alias favicon.ico /var/www/shaarli.mydomain.org/images/favicon.ico |
208 | |||
209 | </VirtualHost> | 214 | </VirtualHost> |
210 | ``` | 215 | ``` |
211 | 216 | ||