Webserver
A Webserver is necessary for running Dolibarr.
Usually the Apache 2 Webserver is used but you can also use nginx.
Example of setup for Nginx
Voici un fichier de configuration Nginx qui fonctionne en HTTPS pour Debian 11, PHP7.4, Nginx 1.18 et Dolibarr 14 :
server {
root /var/www/dolibarr/htdocs;
index index.html index.php;
server_name dolibarr.example.fr;
location / {
try_files $uri $uri/ =404;
}
location ~ [^/]\.php(/|$) {
fastcgi_intercept_errors on;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
fastcgi_pass unix:/run/php/php7.4-fpm.sock;
}
listen [::]:443 ssl ipv6only=on;
listen 443 ssl;
ssl_certificate /etc/letsencrypt/live/dolibarr.example.fr/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/dolibarr.example.fr/privkey.pem;
include /etc/letsencrypt/options-ssl-nginx.conf;
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;
error_log /var/log/nginx/dolibarr.example.fr/error.log warn;
access_log /var/log/nginx/dolibarr.example.fr/access.log;
}
server {
if ($host = dolibarr.example.fr) {
return 301 https://$host$request_uri;
}
listen [::]:80;
listen 80;
server_name dolibarr.example.fr;
return 404;
}