X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=doc%2FServer-configuration.html;h=068900b88ee35484b05adf831c30e55881f07712;hb=fdf88d194874a533cf3a8de3d317d70018aa8a62;hp=e4e383a3a2dd24ce8136d10c16533036325a25e3;hpb=6335a0fc0ce0c2f962333f0b4d6baac1671df901;p=github%2Fshaarli%2FShaarli.git diff --git a/doc/Server-configuration.html b/doc/Server-configuration.html index e4e383a3..068900b8 100644 --- a/doc/Server-configuration.html +++ b/doc/Server-configuration.html @@ -4,45 +4,69 @@ - Shaarli - Server configuration + Shaarli – Server configuration - +
@@ -78,10 +103,10 @@ code > span.er { color: #ff0000; font-weight: bold; }

Example virtual host configurations for popular web servers

Prerequisites

+

Shaarli

+

HTTPS, TLS and self-signed certificates

Related guides:

+

Proxies

+

If Shaarli is served behind a proxy (i.e. there is a proxy server between clients and the web server hosting Shaarli), please refer to the proxy server documentation for proper configuration. In particular, you have to ensure that the following server variables are properly set:

+ +

See also proxy-related issues.

Apache

Minimal

-
<VirtualHost *:80>
+
<VirtualHost *:80>
     ServerName   shaarli.my-domain.org
     DocumentRoot /absolute/path/to/shaarli/
-</VirtualHost>
+</VirtualHost>

Debug - Log all the things!

This configuration will log both Apache and PHP errors, which may prove useful to identify server configuration errors.

See:

-
<VirtualHost *:80>
+
<VirtualHost *:80>
     ServerName   shaarli.my-domain.org
     DocumentRoot /absolute/path/to/shaarli/
 
-    LogLevel  warn
+    LogLevel  warn
     ErrorLog  /var/log/apache2/shaarli-error.log
     CustomLog /var/log/apache2/shaarli-access.log combined
 
@@ -119,45 +154,45 @@ code > span.er { color: #ff0000; font-weight: bold; }
     php_flag  display_errors on
     php_value error_reporting 2147483647
     php_value error_log /var/log/apache2/shaarli-php-error.log
-</VirtualHost>
+</VirtualHost>

Standard - Keep access and error logs

-
<VirtualHost *:80>
+
<VirtualHost *:80>
     ServerName   shaarli.my-domain.org
     DocumentRoot /absolute/path/to/shaarli/
 
-    LogLevel  warn
+    LogLevel  warn
     ErrorLog  /var/log/apache2/shaarli-error.log
     CustomLog /var/log/apache2/shaarli-access.log combined
-</VirtualHost>
+</VirtualHost>

Paranoid - Redirect HTTP (:80) to HTTPS (:443)

See Server-side TLS (Mozilla).

-
<VirtualHost *:443>
+
<VirtualHost *:443>
     ServerName   shaarli.my-domain.org
     DocumentRoot /absolute/path/to/shaarli/
 
-    SSLEngine             on
-    SSLCertificateFile    /absolute/path/to/the/website/certificate.crt
+    SSLEngine             on
+    SSLCertificateFile    /absolute/path/to/the/website/certificate.pem
     SSLCertificateKeyFile /absolute/path/to/the/website/key.key
 
-    <Directory /absolute/path/to/shaarli/>
-        AllowOverride All
-        Options Indexes FollowSymLinks MultiViews
-        Order allow,deny
+    <Directory /absolute/path/to/shaarli/>
+        AllowOverride All
+        Options Indexes FollowSymLinks MultiViews
+        Order allow,deny
         allow from all
     </Directory>
 
-    LogLevel  warn
+    LogLevel  warn
     ErrorLog  /var/log/apache2/shaarli-error.log
     CustomLog /var/log/apache2/shaarli-access.log combined
 </VirtualHost>
-<VirtualHost *:80>
+<VirtualHost *:80>
     ServerName   shaarli.my-domain.org
     Redirect 301 / https://shaarli.my-domain.org
 
-    LogLevel  warn
+    LogLevel  warn
     ErrorLog  /var/log/apache2/shaarli-error.log
     CustomLog /var/log/apache2/shaarli-access.log combined
-</VirtualHost>
+</VirtualHost>

LightHttpd

Nginx

Foreword

@@ -203,13 +238,13 @@ code > span.er { color: #ff0000; font-weight: bold; }
  • user:group = john:users,
  • which corresponds to the following service configuration:

    -
    ; /etc/php/php-fpm.conf
    +
    ; /etc/php/php-fpm.conf
     user = john
     group = users
     
     [...][](.html)
     listen.owner = john
    -listen.group = users
    +listen.group = users
    # /etc/nginx/nginx.conf
     user john users;
     
    @@ -279,10 +314,15 @@ location ~ ~$ {
     }
    # /etc/nginx/php.conf
     location ~ (index)\.php$ {
    -    # proxy PHP requests to PHP-FPM
    +    # filter and proxy PHP requests to PHP-FPM
         fastcgi_pass   unix:/var/run/php-fpm/php-fpm.sock;
         fastcgi_index  index.php;
         include        fastcgi.conf;
    +}
    +
    +location ~ \.php$ {
    +    # deny access to all other PHP scripts
    +    deny all;
     }
    # /etc/nginx/static_assets.conf
     location ~* \.(?:ico|css|js|gif|jpe?g|png)$ {