[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Dolibarr-user] Several question

From: Stéphane Rivière
Subject: Re: [Dolibarr-user] Several question
Date: Mon, 25 Feb 2019 17:46:31 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.3.0

Hi Jérôme,

For version i follow repository version, i currently no have the
manpower to maintain several custom version.  i prefer by the way
improve debian/devuan packages it’s look like smarter for me.

It's all about modularity. I'm a huge Debian/Xen user for our servers but, to my taste, the standart server part (apache/nginx, php, mariadb, etc...) should be installed a separate way and Dolibarr install is so simple that a debian package can be looked as an overkill approach.

Why nginx instead apache ?

Mainly because Nginx is far more faster, efficient, versatile and secure. But GETA (Google Est Ton Ami / ou pas) to check theses assertions.

there is some benchmark ? The webserver is
not only use for dolibarr such move need to be thought and ask "lot" of
time. I also use itk mod. there is an alternative for nginx.

But you can provide me nginx conf files, for my testing server.

Here a working example, valid for xdebug sessions :)

Feel free to ask further to me.


# dolibarr.ro9
# 20181206 - dev initial release with php7-fpm
# 20190213 - extended timeouts and settings to avoid PHPChrome 502
# Adjust line 68 depending your PHP version

#--- Configuration

server {

        listen 80 ;
        server_name dolibarr.ro9;

        #--- Headers

        add_header X-Frame-Options DENY;
        add_header X-Content-Type-Options nosniff;

        #--- Main paths

        root             /srv/www/dolibarr.ro9/htdocs;
        access_log /var/log/nginx/dolibarr.ro9.access.log;
        error_log  /var/log/nginx/dolibarr.ro9.error.log;

        index index.php index.html index.htm;

        location / {
                try_files $uri $uri/ /index.php;

        #--- Cache static files

        location ~ \.(js|css|png|jpg|jpeg|gif|ico)$ {
          expires max;
          log_not_found off;

#--- Dolibarr compression, prefer web server Gzip compression if possible (See below).

        location ~ \.jgz$ {
           add_header Content-Encoding gzip;
           gzip off;
           types { text/javascript jgz; }

        #--- REST API support

        #location /api {
        #    if ( !-e $request_filename) {
        #        rewrite ^.* /api/index.php last;
        #    }


        location ~ [^/]\.php(/|$) {
            try_files $uri =404;
            fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;

            fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;
            include fastcgi_params;

            # Faster upload

            fastcgi_pass_request_body off;
            client_body_in_file_only clean;
            fastcgi_param  REQUEST_BODY_FILE $request_body_file;
            client_body_temp_path /dev/shm/client_body_temp;

            # Debug settings (don't forget to remove this in production)

            fastcgi_param MAIN_SHOW_TUNING_INFO true;

            fastcgi_intercept_errors on;

            # Theses two parameters below to avoid PHPChrome 502 errors
            fastcgi_buffers 64  64k;
            fastcgi_buffer_size 256k;

            fastcgi_busy_buffers_size 512k;
            fastcgi_temp_file_write_size 512k;

            fastcgi_send_timeout 300;
            fastcgi_connect_timeout 60;

            # Keep it sync with /etc/php/7.0/fpm/pool.d/www.conf
            # request_terminate_timeout = 18000
            fastcgi_read_timeout 18000; # Long xdebug sessions (5h)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]