Matoeil Matoeil - 3 months ago 20x
PHP Question

nginx virtual host: php5-fpm-sock error

I am trying to set a virtual host for a fresh ubuntu/php5.5/nginx installation as such

etc/nginx/sites_available/mydomain.comĀ :

server {
listen 80 default_server;
root /home/www/;
index index.php index.html
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;

location ~ \.php$ {
try_files $uri =404;
fastcgi_index index.php;
fastcgi_pass php5-fpm-sock;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_read_timeout 240;
include /etc/nginx/fastcgi_params;

etc/hostsĀ :

symlink in the symlink in the 'sites-enabled' folder :

sudo ln -s /etc/nginx/sites-available/ /etc/nginx/sites-enabled/


service nginx restart

fail and the var/log/nginx/error.log gives

no port in upstream "php5-fpm-sock" in /etc/nginx/sites-enabled/

what can be wrong?


The fpm adress path was missing:

 nano /etc/nginx/conf.d/php5-fpm.conf

edit :

upstream php5-fpm-sock {
    server unix:/var/run/php5-fpm.sock;