X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=doc%2Fmd%2FServer-configuration.md;h=a49b60334c11526bd289ffbd982e04bfbce5ab9d;hb=HEAD;hp=73302bc61bbcf534b81883289f1a8d9f121310c3;hpb=7f5250421be4832b9679d8140bc4a71c8005dfa3;p=github%2Fshaarli%2FShaarli.git
diff --git a/doc/md/Server-configuration.md b/doc/md/Server-configuration.md
index 73302bc6..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
Require all granted
-
- # Prevent accessing dotfiles
- RedirectMatch 404 ".*"
-
+ # BE CAREFUL: directives order matter!
-
+
+ Require all denied
+
+
+
+ Require all granted
+
+
+
# allow client-side caching of static files
Header set Cache-Control "max-age=2628000, public, must-revalidate, proxy-revalidate"
-
+
+
# serve the Shaarli favicon from its custom location
Alias favicon.ico /var/www/shaarli.mydomain.org/images/favicon.ico
-
```
@@ -296,7 +301,7 @@ server {
location / {
# default index file when no file URI is requested
index index.php;
- try_files $uri /index.php$is_args$args;
+ try_files _ /index.php$is_args$args;
}
location ~ (index)\.php$ {
@@ -309,20 +314,9 @@ server {
include fastcgi.conf;
}
- location ~ \.php$ {
- # deny access to all other PHP scripts
- # disable this if you host other PHP applications on the same virtualhost
- deny all;
- }
-
- location ~ /\. {
- # deny access to dotfiles
- deny all;
- }
-
- location ~ ~$ {
- # deny access to temp editor files, e.g. "script.php~"
- deny all;
+ location ~ /doc/html/ {
+ default_type "text/html";
+ try_files $uri $uri/ $uri.html =404;
}
location = /favicon.ico {
@@ -331,13 +325,12 @@ server {
}
# allow client-side caching of static files
- location ~* \.(?:ico|css|js|gif|jpe?g|png)$ {
+ location ~* \.(?:ico|css|js|gif|jpe?g|png|ttf|oet|woff2?)$ {
expires max;
add_header Cache-Control "public, must-revalidate, proxy-revalidate";
# HTTP 1.0 compatibility
add_header Pragma public;
}
-
}
```
@@ -377,7 +370,7 @@ use `https://shaarli.mydomain.org/index.php/`.
**Recommended:**
* after installation, in the configuration page, set your header link to `/index.php/`.
- * in you `config.json.php` set `general.root_url` to
+ * in your configuration file `config.json.php` set `general.root_url` to
`https://shaarli.mydomain.org/index.php/`.
## Allow import of large browser bookmarks export