nginx php-fpm php site configuration

From WebHostingNeeds.com
Jump to: navigation, search

Edit nginx.conf

vi /etc/nginx/nginx.conf

Add

server {

    listen       192.168.1.150:88;

    server_name webhostingneeds.com;
    root /home/webhostingneeds.com/public;

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

    location ~ .php$ {
        include /etc/nginx/fastcgi_params;
        fastcgi_pass  127.0.0.1:9000;
        fastcgi_index index.php;
        fastcgi_param SCRIPT_FILENAME document_root$fastcgi_script_name;
    }
}




install php-fpm from source on centos