diff options
author | ArthurHoaro <arthur@hoa.ro> | 2017-05-07 19:17:33 +0200 |
---|---|---|
committer | ArthurHoaro <arthur@hoa.ro> | 2017-05-07 19:17:33 +0200 |
commit | 01e942d44c7194607649817216aeb5d65c6acad6 (patch) | |
tree | 15777aa1005251f119e6dd680291147117766b5b /doc/Server-configuration.md | |
parent | bc22c9a0acb095970e9494cbe8954f0612e05dc0 (diff) | |
parent | 8868f3ca461011a8fb6dd9f90b60ed697ab52fc5 (diff) | |
download | Shaarli-01e942d44c7194607649817216aeb5d65c6acad6.tar.gz Shaarli-01e942d44c7194607649817216aeb5d65c6acad6.tar.zst Shaarli-01e942d44c7194607649817216aeb5d65c6acad6.zip |
Merge tag 'v0.8.4' into stable
Release v0.8.4
Diffstat (limited to 'doc/Server-configuration.md')
-rw-r--r-- | doc/Server-configuration.md | 56 |
1 files changed, 43 insertions, 13 deletions
diff --git a/doc/Server-configuration.md b/doc/Server-configuration.md index fd98a608..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) | |||
102 | </VirtualHost> | 102 | </VirtualHost> |
103 | ``` | 103 | ``` |
104 | 104 | ||
105 | ### .htaccess | ||
106 | |||
107 | 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. | ||
108 | |||
109 | **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) | ||
110 | |||
105 | ## LightHttpd | 111 | ## LightHttpd |
106 | 112 | ||
107 | ## Nginx | 113 | ## Nginx |
@@ -136,7 +142,7 @@ On a development server: | |||
136 | - files may be located in a user's home directory | 142 | - files may be located in a user's home directory |
137 | - in this case, make sure both Nginx and PHP-FPM are running as the local user/group! | 143 | - in this case, make sure both Nginx and PHP-FPM are running as the local user/group! |
138 | 144 | ||
139 | For all following examples, a development configuration will be used: | 145 | For all following configuration examples, this user/group pair will be used: |
140 | - `user:group = john:users`, | 146 | - `user:group = john:users`, |
141 | 147 | ||
142 | which corresponds to the following service configuration: | 148 | which corresponds to the following service configuration: |
@@ -160,6 +166,32 @@ http { | |||
160 | } | 166 | } |
161 | ``` | 167 | ``` |
162 | 168 | ||
169 | ### (Optional) Increase the maximum file upload size | ||
170 | 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. | ||
171 | |||
172 | To increase upload size, you will need to modify both nginx and PHP configuration: | ||
173 | |||
174 | ```nginx | ||
175 | # /etc/nginx/nginx.conf | ||
176 | |||
177 | http { | ||
178 | [...][](.html) | ||
179 | |||
180 | client_max_body_size 10m; | ||
181 | |||
182 | [...][](.html) | ||
183 | } | ||
184 | ``` | ||
185 | |||
186 | ```ini | ||
187 | # /etc/php5/fpm/php.ini | ||
188 | |||
189 | [...][](.html) | ||
190 | post_max_size = 10M | ||
191 | [...][](.html) | ||
192 | upload_max_filesize = 10M | ||
193 | ``` | ||
194 | |||
163 | ### Minimal | 195 | ### Minimal |
164 | _WARNING: Use for development only!_ | 196 | _WARNING: Use for development only!_ |
165 | 197 | ||
@@ -271,6 +303,11 @@ http { | |||
271 | error_log /var/log/nginx/shaarli.error.log; | 303 | error_log /var/log/nginx/shaarli.error.log; |
272 | } | 304 | } |
273 | 305 | ||
306 | location = /shaarli/favicon.ico { | ||
307 | # serve the Shaarli favicon from its custom location | ||
308 | alias /var/www/shaarli/images/favicon.ico; | ||
309 | } | ||
310 | |||
274 | include deny.conf; | 311 | include deny.conf; |
275 | include static_assets.conf; | 312 | include static_assets.conf; |
276 | include php.conf; | 313 | include php.conf; |
@@ -328,21 +365,14 @@ http { | |||
328 | error_log /var/log/nginx/shaarli.error.log; | 365 | error_log /var/log/nginx/shaarli.error.log; |
329 | } | 366 | } |
330 | 367 | ||
368 | location = /shaarli/favicon.ico { | ||
369 | # serve the Shaarli favicon from its custom location | ||
370 | alias /var/www/shaarli/images/favicon.ico; | ||
371 | } | ||
372 | |||
331 | include deny.conf; | 373 | include deny.conf; |
332 | include static_assets.conf; | 374 | include static_assets.conf; |
333 | include php.conf; | 375 | include php.conf; |
334 | } | 376 | } |
335 | } | 377 | } |
336 | ``` | 378 | ``` |
337 | |||
338 | ## Restricting search engines and web crawler traffic | ||
339 | |||
340 | Creating a `robots.txt` witht he following contents at the root of your Shaarli installation will prevent "honest" web crawlers from indexing each and every link and Daily page from a Shaarli instance, thus getting rid of a certain amount of unsollicited network traffic. | ||
341 | |||
342 | ``` | ||
343 | User-agent: * | ||
344 | Disallow: / | ||
345 | ``` | ||
346 | |||
347 | See: http://www.robotstxt.org/, http://www.robotstxt.org/robotstxt.html, http://www.robotstxt.org/meta.html | ||
348 | |||