Nginx, PHP-Fpm and Ubuntu

Packages

Install the recommand packages for FusionDirectory, Nginx and php5-fpm

PHP-Fpm options

The options in PHP-Fpm are in /etc/php5/fpm/php.ini

[opcache]
opcache.enable_cli = 0
opcache.memory_consumption = 1024
opcache.max_accelerated_files = 65407
opcache.validate_timestamps = 0
opcache.revalidate_path = On
opcache.error_log = /dev/null
opcache.log_verbosity_level = 1

Nginx

server {
  listen 80;
  root /usr/share/fusiondirectory/html;
  index index.php;
 
  server_name fusiondirectory.acme.com;
 
  location ~ ^/.*\.php(/|$) {
    expires off; # do not cache dynamic content
    fastcgi_pass 127.0.0.1:9000;
    fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
    fastcgi_param DOCUMENT_ROOT $realpath_root;
    include /etc/nginx/fastcgi_params; # see /etc/nginx/fastcgi_params
  }
}

Tips

When you install a FusionDirectory plugin, restart php-fpm too

en/documentation_howto/nginx_php-fpm_ubuntu.txt · Last modified: 2017/10/31 10:32 (external edit)
CC Attribution-Share Alike 4.0 International
Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0