X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=doc%2FServer-configuration.md;h=df10feb255b4321ac8312a5b3c04d186cd188af8;hb=3cc8c898307ad53507a128db2b11238be2641c32;hp=1ab57a0a34a977f8cdeb18d7ed8882c882c4dc2b;hpb=75f7adee19f3cced8a2d5eb134e9d6723a69a474;p=github%2Fshaarli%2FShaarli.git diff --git a/doc/Server-configuration.md b/doc/Server-configuration.md index 1ab57a0a..df10feb2 100644 --- a/doc/Server-configuration.md +++ b/doc/Server-configuration.md @@ -102,6 +102,12 @@ See [Server-side TLS](https://wiki.mozilla.org/Security/Server_Side_TLS#Apache) ``` +### .htaccess + +Shaarli use `.htaccess` Apache files to deny access to files that shouldn't be directly accessed (datastore, config, etc.). You need the directive `AllowOverride All` in your virtual host configuration for them to work. + +**Warning**: If you use Apache 2.2 or lower, you need [mod_version](https://httpd.apache.org/docs/current/mod/mod_version.html) to be installed and enabled.[](.html) + ## LightHttpd ## Nginx @@ -136,7 +142,7 @@ On a development server: - files may be located in a user's home directory - in this case, make sure both Nginx and PHP-FPM are running as the local user/group! -For all following examples, a development configuration will be used: +For all following configuration examples, this user/group pair will be used: - `user:group = john:users`, which corresponds to the following service configuration: @@ -160,6 +166,32 @@ http { } ``` +### (Optional) Increase the maximum file upload size +Some bookmark dumps generated by web browsers can be _huge_ due to the presence of Base64-encoded images and favicons, as well as extra verbosity when nesting links in (sub-)folders. + +To increase upload size, you will need to modify both nginx and PHP configuration: + +```nginx +# /etc/nginx/nginx.conf + +http { + [...][](.html) + + client_max_body_size 10m; + + [...][](.html) +} +``` + +```ini +# /etc/php5/fpm/php.ini + +[...][](.html) +post_max_size = 10M +[...][](.html) +upload_max_filesize = 10M +``` + ### Minimal _WARNING: Use for development only!_ @@ -271,6 +303,11 @@ http { error_log /var/log/nginx/shaarli.error.log; } + location = /shaarli/favicon.ico { + # serve the Shaarli favicon from its custom location + alias /var/www/shaarli/images/favicon.ico; + } + include deny.conf; include static_assets.conf; include php.conf; @@ -328,6 +365,11 @@ http { error_log /var/log/nginx/shaarli.error.log; } + location = /shaarli/favicon.ico { + # serve the Shaarli favicon from its custom location + alias /var/www/shaarli/images/favicon.ico; + } + include deny.conf; include static_assets.conf; include php.conf;