Difference between revisions of "nginx php-fpm php site configuration"

From WebHostingNeeds.com
Jump to: navigation, search
(Created page with "Edit nginx.conf <pre> vi /etc/nginx/nginx.conf </pre> Add <pre> server { listen 192.168.1.150:88; server_name webhostingneeds.com; root /mnt/hgfs/Temp/w...")
 
m
 
Line 13: Line 13:
  
 
     server_name webhostingneeds.com;
 
     server_name webhostingneeds.com;
     root /mnt/hgfs/Temp/webhostingneeds.com/public;
+
     root /home/webhostingneeds.com/public;
  
 
     location / {
 
     location / {
Line 23: Line 23:
 
         fastcgi_pass  127.0.0.1:9000;
 
         fastcgi_pass  127.0.0.1:9000;
 
         fastcgi_index index.php;
 
         fastcgi_index index.php;
         fastcgi_param SCRIPT_FILENAME /mnt/hgfs/Temp/webhostingneeds.com/public$fastcgi_script_name;
+
         fastcgi_param SCRIPT_FILENAME document_root$fastcgi_script_name;
 
     }
 
     }
 
}
 
}

Latest revision as of 04:15, 2 November 2017

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