<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
<title>PHP Files = File not found</title>
<description>Greetings,

I'm currently experiencing some issues with my nginx + php-fpm install. When I try to navigate to my info.php file then I receive a &amp;quot;File not found&amp;quot; message, where as if I were to navigate to a file that isn't actually there I would receive an actual 404 error. 

My PHP version = PHP 5.3.10

My PHP-FPM Config:

; FPM Configuration ;
;;;;;;;;;;;;;;;;;;;;;

; All relative paths in this configuration file are relative to PHP's install
; prefix.

; Include one or more files. If glob(3) exists, it is used to include a bunch of
; files from a glob(3) pattern. This directive can be used everywhere in the
; file.
include=/etc/php-fpm.d/*.conf

;;;;;;;;;;;;;;;;;;
; Global Options ;
;;;;;;;;;;;;;;;;;;

[global]
; Pid file
; Default Value: none
pid = /var/run/php-fpm/php-fpm.pid

; Error log file
; Default Value: /var/log/php-fpm.log
error_log = /var/log/php-fpm/error.log

; Log level
; Possible Values: alert, error, warning, notice, debug
; Default Value: notice
;log_level = notice

; If this number of child processes exit with SIGSEGV or SIGBUS within the time
; interval set by emergency_restart_interval then FPM will restart. A value
; of '0' means 'Off'.
; Default Value: 0
;emergency_restart_threshold = 0

; Interval of time used by emergency_restart_interval to determine when
; a graceful restart will be initiated. This can be useful to work around
; accidental corruptions in an accelerator's shared memory.
; Available Units: s(econds), m(inutes), h(ours), or d(ays)
; Default Unit: seconds
; Default Value: 0
;emergency_restart_interval = 0

; Time limit for child processes to wait for a reaction on signals from master.
; Available units: s(econds), m(inutes), h(ours), or d(ays)
; Default Unit: seconds
; Default Value: 0
;process_control_timeout = 0

; Send FPM to background. Set to 'no' to keep FPM in foreground for debugging.
; Default Value: yes
;daemonize = yes

Do you require pool definitions as well??

nginx.conf


user nginx;
worker_processes 1;

error_log /var/log/nginx/error.log warn;
pid /var/run/nginx.pid;


events {
worker_connections 1024;
}


http {
include /etc/nginx/mime.types;
default_type application/octet-stream;

log_format main '$remote_addr - $remote_user [$time_local] &amp;quot;$request&amp;quot; '
'$status $body_bytes_sent &amp;quot;$http_referer&amp;quot; '
'&amp;quot;$http_user_agent&amp;quot; &amp;quot;$http_x_forwarded_for&amp;quot;';

access_log /var/log/nginx/access.log main;

sendfile on;
#tcp_nopush on;

keepalive_timeout 65;

#gzip on;

include /etc/nginx/conf.d/*.conf;
}


And finally the nginx/conf.d/default.conf

server {
listen 80;
server_name localhost;

#charset koi8-r;
#access_log /var/log/nginx/log/host.access.log main;

location / {
root /usr/share/nginx/html;
index index.html index.htm index.php;
}

#error_page 404 /404.html;

# redirect server error pages to the static page /50x.html
#
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}

# proxy the PHP scripts to Apache listening on 127.0.0.1:80
#
#location ~ \.php$ {
# proxy_pass http://127.0.0.1;
#}






# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
#
location ~ \.php$ {
root html;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}

# deny access to .htaccess files, if Apache's document root
# concurs with nginx's one
#
#location ~ /\.ht {
# deny all;
#}
}



My best guess it that it's going to be something stupid!! Any help would be greatly appreciated, I will probably end up going home and spend the rest of my time trying to figure out what I did wrong. 

Thanks,
Jeremiah</description><link>http://forum.nginx.org/read.php?3,222813,222813#msg-222813</link><lastBuildDate>Sun, 26 May 2013 03:31:15 -0400</lastBuildDate>
<generator>Phorum 5.2.16</generator>
<item>
<guid>http://forum.nginx.org/read.php?3,222813,222856#msg-222856</guid>
<title>Re: PHP Files = File not found</title><link>http://forum.nginx.org/read.php?3,222813,222856#msg-222856</link><description><![CDATA[Brian,<br /><br />Thank you SO much!!! That did resolve the issue, and it also deepened my understanding of the nginx and php-fpm relationship!<br /><br />Thank you very much for your time!!]]></description>
<dc:creator>JerW</dc:creator>
<category>Php-fpm Mailing List - English</category><pubDate>Wed, 22 Feb 2012 11:26:05 -0500</pubDate></item>
<item>
<guid>http://forum.nginx.org/read.php?3,222813,222821#msg-222821</guid>
<title>Re: PHP Files = File not found</title><link>http://forum.nginx.org/read.php?3,222813,222821#msg-222821</link><description><![CDATA[JerW Wrote:<br />-------------------------------------------------------<br />&gt; Greetings,<br />&gt;<br />&gt; I'm currently experiencing some issues with my<br />&gt; nginx + php-fpm install. When I try to navigate to<br />&gt; my info.php file then I receive a &quot;File not found&quot;<br />&gt; message, where as if I were to navigate to a file<br />&gt; that isn't actually there I would receive an<br />&gt; actual 404 error.<br />&gt;<br />&gt; My PHP version = PHP 5.3.10<br />&gt;<br />&gt; My PHP-FPM Config:<br />&gt;<br />&gt; ; FPM Configuration ;<br />&gt; ;;;;;;;;;;;;;;;;;;;;;<br />&gt;<br />&gt; ; All relative paths in this configuration file<br />&gt; are relative to PHP's install<br />&gt; ; prefix.<br />&gt;<br />&gt; ; Include one or more files. If glob(3) exists, it<br />&gt; is used to include a bunch of<br />&gt; ; files from a glob(3) pattern. This directive can<br />&gt; be used everywhere in the<br />&gt; ; file.<br />&gt; include=/etc/php-fpm.d/*.conf<br />&gt;<br />&gt; ;;;;;;;;;;;;;;;;;;<br />&gt; ; Global Options ;<br />&gt; ;;;;;;;;;;;;;;;;;;<br />&gt;<br />&gt; [global]<br />&gt; ; Pid file<br />&gt; ; Default Value: none<br />&gt; pid = /var/run/php-fpm/php-fpm.pid<br />&gt;<br />&gt; ; Error log file<br />&gt; ; Default Value: /var/log/php-fpm.log<br />&gt; error_log = /var/log/php-fpm/error.log<br />&gt;<br />&gt; ; Log level<br />&gt; ; Possible Values: alert, error, warning, notice,<br />&gt; debug<br />&gt; ; Default Value: notice<br />&gt; ;log_level = notice<br />&gt;<br />&gt; ; If this number of child processes exit with<br />&gt; SIGSEGV or SIGBUS within the time<br />&gt; ; interval set by emergency_restart_interval then<br />&gt; FPM will restart. A value<br />&gt; ; of '0' means 'Off'.<br />&gt; ; Default Value: 0<br />&gt; ;emergency_restart_threshold = 0<br />&gt;<br />&gt; ; Interval of time used by<br />&gt; emergency_restart_interval to determine when<br />&gt; ; a graceful restart will be initiated. This can<br />&gt; be useful to work around<br />&gt; ; accidental corruptions in an accelerator's<br />&gt; shared memory.<br />&gt; ; Available Units: s(econds), m(inutes), h(ours),<br />&gt; or d(ays)<br />&gt; ; Default Unit: seconds<br />&gt; ; Default Value: 0<br />&gt; ;emergency_restart_interval = 0<br />&gt;<br />&gt; ; Time limit for child processes to wait for a<br />&gt; reaction on signals from master.<br />&gt; ; Available units: s(econds), m(inutes), h(ours),<br />&gt; or d(ays)<br />&gt; ; Default Unit: seconds<br />&gt; ; Default Value: 0<br />&gt; ;process_control_timeout = 0<br />&gt;<br />&gt; ; Send FPM to background. Set to 'no' to keep FPM<br />&gt; in foreground for debugging.<br />&gt; ; Default Value: yes<br />&gt; ;daemonize = yes<br />&gt;<br />&gt; Do you require pool definitions as well??<br />&gt;<br />&gt; nginx.conf<br />&gt;<br />&gt;<br />&gt; user nginx;<br />&gt; worker_processes 1;<br />&gt;<br />&gt; error_log /var/log/nginx/error.log warn;<br />&gt; pid /var/run/nginx.pid;<br />&gt;<br />&gt;<br />&gt; events {<br />&gt; worker_connections 1024;<br />&gt; }<br />&gt;<br />&gt;<br />&gt; http {<br />&gt; include /etc/nginx/mime.types;<br />&gt; default_type application/octet-stream;<br />&gt;<br />&gt; log_format main '$remote_addr - $remote_user<br />&gt; [$time_local] &quot;$request&quot; '<br />&gt; '$status $body_bytes_sent<br />&gt; &quot;$http_referer&quot; '<br />&gt; '&quot;$http_user_agent&quot;<br />&gt; &quot;$http_x_forwarded_for&quot;';<br />&gt;<br />&gt; access_log /var/log/nginx/access.log main;<br />&gt;<br />&gt; sendfile on;<br />&gt; #tcp_nopush on;<br />&gt;<br />&gt; keepalive_timeout 65;<br />&gt;<br />&gt; #gzip on;<br />&gt;<br />&gt; include /etc/nginx/conf.d/*.conf;<br />&gt; }<br />&gt;<br />&gt;<br />&gt; And finally the nginx/conf.d/default.conf<br />&gt;<br />&gt; server {<br />&gt; listen 80;<br />&gt; server_name localhost;<br />&gt;<br />&gt; #charset koi8-r;<br />&gt; #access_log<br />&gt; /var/log/nginx/log/host.access.log main;<br />&gt;<br />&gt; location / {<br />&gt; root /usr/share/nginx/html;<br />&gt; index index.html index.htm index.php;<br />&gt; }<br />&gt;<br />&gt; #error_page 404 /404.html;<br />&gt;<br />&gt; # redirect server error pages to the static<br />&gt; page /50x.html<br />&gt; #<br />&gt; error_page 500 502 503 504 /50x.html;<br />&gt; location = /50x.html {<br />&gt; root /usr/share/nginx/html;<br />&gt; }<br />&gt;<br />&gt; # proxy the PHP scripts to Apache listening on<br />&gt; 127.0.0.1:80<br />&gt; #<br />&gt; #location ~ \.php$ {<br />&gt; # proxy_pass http://127.0.0.1;<br />&gt; #}<br />&gt;<br />&gt;<br />&gt;<br />&gt;<br />&gt;<br />&gt;<br />&gt; # pass the PHP scripts to FastCGI server<br />&gt; listening on 127.0.0.1:9000<br />&gt; #<br />&gt; location ~ \.php$ {<br />&gt; root html;<br />&gt; fastcgi_pass 127.0.0.1:9000;<br />&gt; fastcgi_index index.php;<br />&gt; fastcgi_param SCRIPT_FILENAME<br />&gt; $document_root$fastcgi_script_name;<br />&gt; include fastcgi_params;<br />&gt; }<br />&gt;<br />&gt; # deny access to .htaccess files, if Apache's<br />&gt; document root<br />&gt; # concurs with nginx's one<br />&gt; #<br />&gt; #location ~ /\.ht {<br />&gt; # deny all;<br />&gt; #}<br />&gt; }<br />&gt;<br />&gt;<br />&gt;<br />&gt; My best guess it that it's going to be something<br />&gt; stupid!! Any help would be greatly appreciated, I<br />&gt; will probably end up going home and spend the rest<br />&gt; of my time trying to figure out what I did wrong.<br />&gt;<br />&gt;<br />&gt; Thanks,<br />&gt; Jeremiah<br /><br />One message is issued by nginx and the other is issued by php.<br /><br />I'm going to guess that you need to change the &quot;root html;&quot; in your &quot;\.php$&quot; location to be &quot;root /usr/share/nginx/html;&quot; to match your other locations.<br /><br />BTW, if you use the same root for all your locations you can just state it once at the server level and it'll be inherited by all the locations.]]></description>
<dc:creator>brianmercer</dc:creator>
<category>Php-fpm Mailing List - English</category><pubDate>Tue, 21 Feb 2012 22:30:21 -0500</pubDate></item>
<item>
<guid>http://forum.nginx.org/read.php?3,222813,222813#msg-222813</guid>
<title>PHP Files = File not found</title><link>http://forum.nginx.org/read.php?3,222813,222813#msg-222813</link><description><![CDATA[Greetings,<br /><br />I'm currently experiencing some issues with my nginx + php-fpm install. When I try to navigate to my info.php file then I receive a &quot;File not found&quot; message, where as if I were to navigate to a file that isn't actually there I would receive an actual 404 error.<br /><br />My PHP version = PHP 5.3.10<br /><br />My PHP-FPM Config:<br /><br />; FPM Configuration ;<br />;;;;;;;;;;;;;;;;;;;;;<br /><br />; All relative paths in this configuration file are relative to PHP's install<br />; prefix.<br /><br />; Include one or more files. If glob(3) exists, it is used to include a bunch of<br />; files from a glob(3) pattern. This directive can be used everywhere in the<br />; file.<br />include=/etc/php-fpm.d/*.conf<br /><br />;;;;;;;;;;;;;;;;;;<br />; Global Options ;<br />;;;;;;;;;;;;;;;;;;<br /><br />[global]<br />; Pid file<br />; Default Value: none<br />pid = /var/run/php-fpm/php-fpm.pid<br /><br />; Error log file<br />; Default Value: /var/log/php-fpm.log<br />error_log = /var/log/php-fpm/error.log<br /><br />; Log level<br />; Possible Values: alert, error, warning, notice, debug<br />; Default Value: notice<br />;log_level = notice<br /><br />; If this number of child processes exit with SIGSEGV or SIGBUS within the time<br />; interval set by emergency_restart_interval then FPM will restart. A value<br />; of '0' means 'Off'.<br />; Default Value: 0<br />;emergency_restart_threshold = 0<br /><br />; Interval of time used by emergency_restart_interval to determine when<br />; a graceful restart will be initiated. This can be useful to work around<br />; accidental corruptions in an accelerator's shared memory.<br />; Available Units: s(econds), m(inutes), h(ours), or d(ays)<br />; Default Unit: seconds<br />; Default Value: 0<br />;emergency_restart_interval = 0<br /><br />; Time limit for child processes to wait for a reaction on signals from master.<br />; Available units: s(econds), m(inutes), h(ours), or d(ays)<br />; Default Unit: seconds<br />; Default Value: 0<br />;process_control_timeout = 0<br /><br />; Send FPM to background. Set to 'no' to keep FPM in foreground for debugging.<br />; Default Value: yes<br />;daemonize = yes<br /><br />Do you require pool definitions as well??<br /><br />nginx.conf<br /><br /><br />user nginx;<br />worker_processes 1;<br /><br />error_log /var/log/nginx/error.log warn;<br />pid /var/run/nginx.pid;<br /><br /><br />events {<br />worker_connections 1024;<br />}<br /><br /><br />http {<br />include /etc/nginx/mime.types;<br />default_type application/octet-stream;<br /><br />log_format main '$remote_addr - $remote_user [$time_local] &quot;$request&quot; '<br />'$status $body_bytes_sent &quot;$http_referer&quot; '<br />'&quot;$http_user_agent&quot; &quot;$http_x_forwarded_for&quot;';<br /><br />access_log /var/log/nginx/access.log main;<br /><br />sendfile on;<br />#tcp_nopush on;<br /><br />keepalive_timeout 65;<br /><br />#gzip on;<br /><br />include /etc/nginx/conf.d/*.conf;<br />}<br /><br /><br />And finally the nginx/conf.d/default.conf<br /><br />server {<br />listen 80;<br />server_name localhost;<br /><br />#charset koi8-r;<br />#access_log /var/log/nginx/log/host.access.log main;<br /><br />location / {<br />root /usr/share/nginx/html;<br />index index.html index.htm index.php;<br />}<br /><br />#error_page 404 /404.html;<br /><br /># redirect server error pages to the static page /50x.html<br />#<br />error_page 500 502 503 504 /50x.html;<br />location = /50x.html {<br />root /usr/share/nginx/html;<br />}<br /><br /># proxy the PHP scripts to Apache listening on 127.0.0.1:80<br />#<br />#location ~ \.php$ {<br /># proxy_pass http://127.0.0.1;<br />#}<br /><br /><br /><br /><br /><br /><br /># pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000<br />#<br />location ~ \.php$ {<br />root html;<br />fastcgi_pass 127.0.0.1:9000;<br />fastcgi_index index.php;<br />fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;<br />include fastcgi_params;<br />}<br /><br /># deny access to .htaccess files, if Apache's document root<br /># concurs with nginx's one<br />#<br />#location ~ /\.ht {<br /># deny all;<br />#}<br />}<br /><br /><br /><br />My best guess it that it's going to be something stupid!! Any help would be greatly appreciated, I will probably end up going home and spend the rest of my time trying to figure out what I did wrong.<br /><br />Thanks,<br />Jeremiah]]></description>
<dc:creator>JerW</dc:creator>
<category>Php-fpm Mailing List - English</category><pubDate>Tue, 21 Feb 2012 16:58:49 -0500</pubDate></item>
</channel>
</rss>