Table of Contents

php

add php fpm service as user ntmr

adduser –system –home /devnull –no-create-home –group –disabled-login –gecos “ntmr” ntmr

fpm config

/etc/php5/fpm/pool.d/ntmr.conf
[notomorrow.de]
 
user = ntmr
group = ntmr
listen = '/tmp/php-fpm-ntmr.sock'
pm = dynamic
pm.max_children = 5
pm.start_servers = 2
pm.min_spare_servers = 1
pm.max_spare_servers = 3
 

nginx config

/etc/nginx/inc/ntmr.php.inc
location ~ \.php$ {
  fastcgi_split_path_info ^(.+\.php)(/.+)$;
  include        fastcgi_params;
 
  fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
 
  fastcgi_intercept_errors on;
  fastcgi_pass unix:/tmp/php-fpm-ntmr.sock;
}

sample host

        root   /srv/ntmr;
        index  index.php index.html;
 
         location / {
           try_files $uri $uri/index.php; }
 
        include        conf.d/ntmr.php.inc;
 
        ssl on;
        ssl_certificate  /etc/nginx/keys/mail.ntmr.crt;
        ssl_certificate_key /etc/nginx/keys/mail.ntmr.key;                                                                                    
 
        ssl_session_timeout  5m;
        ssl_protocols  SSLv2  TLSv1;
        ssl_ciphers ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP;
        ssl_prefer_server_ciphers   on;
 

php-apps

Log In