aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--.htaccess2
-rw-r--r--doc/md/Server-configuration.md19
2 files changed, 13 insertions, 8 deletions
diff --git a/.htaccess b/.htaccess
index 25fcfb03..9d1522df 100644
--- a/.htaccess
+++ b/.htaccess
@@ -13,7 +13,7 @@ RewriteRule .* - [e=HTTP_AUTHORIZATION:%1]
13# Alternative (if the 2 lines above don't work) 13# Alternative (if the 2 lines above don't work)
14# SetEnvIf Authorization .+ HTTP_AUTHORIZATION=$0 14# SetEnvIf Authorization .+ HTTP_AUTHORIZATION=$0
15 15
16# REST API 16# Slim URL Redirection
17# Ionos Hosting needs RewriteBase / 17# Ionos Hosting needs RewriteBase /
18# RewriteBase / 18# RewriteBase /
19RewriteCond %{REQUEST_FILENAME} !-f 19RewriteCond %{REQUEST_FILENAME} !-f
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