Tag Archives: Php

Поддержка PHP в Nginx (PHP-FPM)

nginx.conf

[...]
server {
       listen 80;
       server_name example.com;
       root /sites/site_name/www/public_html;
       index index.php index.html;

location / {
       index index.php index.html index.htm;
}

location ~ \.php$ {
       fastcgi_pass unix:/var/run/php5-fpm.sock;
       fastcgi_index index.php;
       fastcgi_param SCRIPT_FILENAME /sites/site_name/www/public_html;
       include fastcgi_params;
}

}


[...]