Installation and configuration

  • install nginx and php with fpm use flag
  • create directory for vhost in /var/www, “chgrp nginx” it, and “chmod g+rXs” it (possibly o-rwx as well).
  • change “listen = /var/run/php-fpm.socket” and “user = nginx group = nginx” instead of “nobody” in /etc/php/php-fpm-xx/php-fpm.conf
  • add server config in /etc/nginx/nginx.conf such as:
            server {
                    listen 80;
                    access_log /var/log/nginx/ main;
                    error_log /var/log/nginx/ info;
                    index index.php;
                    root /var/www/;
                    location ~ \.php$ {
                            include /etc/nginx/fastcgi.conf;
                            fastcgi_pass unix:/var/run/php-fpm.socket;
                            fastcgi_param  PHP_VALUE  "include_path=.:/var/www/";
  • start nginx and php-fpm init scripts and add them to rc-update
software/nginx.txt · Last modified: 2013/09/19 16:40 (external edit)
CC Attribution-Share Alike 4.0 International
Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0