aboutsummaryrefslogtreecommitdiffhomepage
path: root/doc/Server-configuration.md
diff options
context:
space:
mode:
Diffstat (limited to 'doc/Server-configuration.md')
-rw-r--r--doc/Server-configuration.md15
1 files changed, 15 insertions, 0 deletions
diff --git a/doc/Server-configuration.md b/doc/Server-configuration.md
index df10feb2..81cc1a72 100644
--- a/doc/Server-configuration.md
+++ b/doc/Server-configuration.md
@@ -107,6 +107,8 @@ See [Server-side TLS](https://wiki.mozilla.org/Security/Server_Side_TLS#Apache)
107Shaarli 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. 107Shaarli 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 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) 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
111Apache module `mod_rewrite` **must** be enabled to use the REST API. URL rewriting rules for the Slim microframework are stated in the root `.htaccess` file.
110 112
111## LightHttpd 113## LightHttpd
112 114
@@ -218,11 +220,14 @@ http {
218 error_log /var/log/nginx/error.log; 220 error_log /var/log/nginx/error.log;
219 221
220 location /shaarli/ { 222 location /shaarli/ {
223 try_files $uri /shaarli/index.php$is_args$args;
221 access_log /var/log/nginx/shaarli.access.log; 224 access_log /var/log/nginx/shaarli.access.log;
222 error_log /var/log/nginx/shaarli.error.log; 225 error_log /var/log/nginx/shaarli.error.log;
223 } 226 }
224 227
225 location ~ (index)\.php$ { 228 location ~ (index)\.php$ {
229 try_files $uri =404;
230 fastcgi_split_path_info ^(.+\.php)(/.+)$;
226 fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock; 231 fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock;
227 fastcgi_index index.php; 232 fastcgi_index index.php;
228 include fastcgi.conf; 233 include fastcgi.conf;
@@ -261,6 +266,10 @@ location ~ ~$ {
261```nginx 266```nginx
262# /etc/nginx/php.conf 267# /etc/nginx/php.conf
263location ~ (index)\.php$ { 268location ~ (index)\.php$ {
269 # Slim - split URL path into (script_filename, path_info)
270 try_files $uri =404;
271 fastcgi_split_path_info ^(.+\.php)(/.+)$;
272
264 # filter and proxy PHP requests to PHP-FPM 273 # filter and proxy PHP requests to PHP-FPM
265 fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock; 274 fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock;
266 fastcgi_index index.php; 275 fastcgi_index index.php;
@@ -299,6 +308,9 @@ http {
299 server_name my.first.domain.org; 308 server_name my.first.domain.org;
300 309
301 location /shaarli/ { 310 location /shaarli/ {
311 # Slim - rewrite URLs
312 try_files $uri /shaarli/index.php$is_args$args;
313
302 access_log /var/log/nginx/shaarli.access.log; 314 access_log /var/log/nginx/shaarli.access.log;
303 error_log /var/log/nginx/shaarli.error.log; 315 error_log /var/log/nginx/shaarli.error.log;
304 } 316 }
@@ -361,6 +373,9 @@ http {
361 ssl_certificate_key /home/john/ssl/localhost.key; 373 ssl_certificate_key /home/john/ssl/localhost.key;
362 374
363 location /shaarli/ { 375 location /shaarli/ {
376 # Slim - rewrite URLs
377 try_files $uri /index.php$is_args$args;
378
364 access_log /var/log/nginx/shaarli.access.log; 379 access_log /var/log/nginx/shaarli.access.log;
365 error_log /var/log/nginx/shaarli.error.log; 380 error_log /var/log/nginx/shaarli.error.log;
366 } 381 }