Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It's 100% free, no registration required.

I'm using nginx on centos 7 with php 5.4.16. I have tried this to adding nginx.conf:

    location ~ \.php$ {
    try_files $uri =404;
    fastcgi_split_path_info ^(.+\.php)(/.+)$;
    fastcgi_pass unix:/var/run/php5-fpm.sock;
    fastcgi_index index.php;
    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
    include fastcgi_params;
}

But there is no sucha file at: /var/run/php5-fpm.sock Also php funcion works without any problem at terminal. But when I send request to php file from web, the output is the raw php code. What should I do?

share|improve this question

migrated from stackoverflow.com Aug 3 at 10:23

This question came from our site for professional and enthusiast programmers.

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.