Welcome! Log In Create A New Profile

Advanced

nginx + php-fpm = file not found

December 12, 2014 02:17PM
I am getting File not found error with nginx and i have been trying to fix this for hours.The config look similar to what i use on other sites but i don't know why it doesn't work.html files works fine thought.index.php location is /home/servergreek.com/public_html/www/index.php.Thanks for helping me out.My Nginx version : 1.7.8 & php version is PHP 5.5.20 (cli) (built: Dec 10 2014 14:03:09)

server {
listen 80;
server_name servergreek.com 167.88.125.157;
return 301 http://www.servergreek.com$request_uri;
}
server {
listen 80 default_server;
server_name www.servergreek.com;
access_log /home/servergreek.com/public_html/logs/access_log main;
error_log /home/servergreek.com/public_html/logs/error_log crit;
root /home/servergreek.com/public_html/www;
index index.php index.html index.htm;

#Serve static content directly
location ~* \.(jpg|jpeg|gif|css|png|js|ico|html|woff)$ {
access_log off;
expires max;
}

location ~ ^/tmp/(.*)$ {
deny all;
}



# Zend Opcache rules
#location /opcache/ {
# root /home/servergreek.com/public_html/www;
# index index.php index.html index.htm;
# auth_basic "Restricted Area (Secured by Khavish)";
# auth_basic_user_file /var/www/servergreek.com/private/htpasswd;
#}

# Only requests to our Host are allowed
if ($host !~ ^(servergreek.com|www.servergreek.com)$ ) {
return 444;
}

location ~* \.php$ {
root /home/servergreek.com/public_html/www;
fastcgi_pass unix:/tmp/php5-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
fastcgi_connect_timeout 60;
fastcgi_send_timeout 300;
fastcgi_read_timeout 300;
fastcgi_buffer_size 128k;
fastcgi_buffers 256 16k;
fastcgi_busy_buffers_size 256k;

}

#location ~ /\.ht {
# deny all;
#}


}
Subject Author Posted

nginx + php-fpm = file not found

khav December 12, 2014 02:17PM

Re: nginx + php-fpm = file not found

Jader H. Silva December 12, 2014 04:10PM

Re: nginx + php-fpm = file not found

khav December 13, 2014 04:32AM

Re: nginx + php-fpm = file not found

khav December 14, 2014 11:20PM

Re: nginx + php-fpm = file not found

Francis Daly December 15, 2014 04:02AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 171
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready