Welcome! Log In Create A New Profile

Advanced

nginx 0.8.47 php-fpm error_page not working

August 08, 2010 02:36AM
Dear Nginx Experts / Friends,

I am new to nginx. Just getting my feet wet since around 15 days.
I am sorry for this extremely long post. Just wanted to give all details
for quick understanding of the problem hence long code attachments.

I have installed CentOS 5.5 + nginx + php-fpm on linode.com VPS.
Default error_page 404 in nginx.conf for server localhost is working.

But for domain name based configuration [1] error_page is not working.
I disabled php-fpm to see if that is the problem, but still I do not see the error404.htm
page. I am also attaching my nginx.conf [2], fastcgi_params [3] & php-fpm.conf [4] for reference.
I even did a debug [5] but could not find any problem from the same.

Attachment One [/etc/nginx/sites-enabled/mutually4u.com]
---------------------------------------------------------------------------------------------------------------------------------
server {
listen 80;
server_name www.mutually4u.com mutually4u.com;
access_log /srv/www/mutually4u.com/logs/access.log;
error_log /srv/www/mutually4u.com/logs/error.log debug;

error_page 404 /error404.htm;

location /error404.htm {
root /srv/www/mutually4u.com/public_html;
}

location = /favicon.ico {
#empty_gif;
return 204;
}

location / {
root /srv/www/mutually4u.com/public_html;
index index.htm;

if (-f $request_filename) {
break;
}
}

location ~ \.htm$
{
root /srv/www/mutually4u.com/public_html;
fastcgi_pass 127.0.0.1:9000;
fastcgi_param SCRIPT_FILENAME /srv/www/mutually4u.com/public_html$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_script_name;
include /etc/nginx/fastcgi_params;
}

}
---------------------------------------------------------------------------------------------------------------------------------

Attachment Two [/etc/nginx/nginx.conf]
---------------------------------------------------------------------------------------------------------------------------------
user nginx;
worker_processes 1;

events {
worker_connections 1024;
}

http {
include mime.types;
default_type application/octet-stream;

log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';

access_log logs/access.log main;
error_log logs/error.log;

sendfile on;
#tcp_nopush on;

keepalive_timeout 65;

gzip on;
gzip_comp_level 1;
gzip_proxied any;
gzip_types text/plain text/html text/css application/x-javascript text/xml application/xml application/xml+rss text/javascript;

server {
listen 80;
server_name localhost;

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

location = /favicon.ico {
return 204;
}

error_page 404 /404.html;
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}

location ~ \.php$ {
root html;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
include fastcgi_params;
}
}

include /etc/nginx/sites-enabled/*;
}
---------------------------------------------------------------------------------------------------------------------------------

Attachment Three [/etc/nginx/fastcgi_params]
---------------------------------------------------------------------------------------------------------------------------------
fastcgi_connect_timeout 60;
fastcgi_send_timeout 180;
fastcgi_read_timeout 180;
fastcgi_buffer_size 128k;
fastcgi_buffers 4 256k;
fastcgi_busy_buffers_size 256k;
fastcgi_temp_file_write_size 256k;
fastcgi_intercept_errors on;

fastcgi_param QUERY_STRING $query_string;
fastcgi_param REQUEST_METHOD $request_method;
fastcgi_param CONTENT_TYPE $content_type;
fastcgi_param CONTENT_LENGTH $content_length;

fastcgi_param SCRIPT_NAME $fastcgi_script_name;
fastcgi_param REQUEST_URI $request_uri;
fastcgi_param DOCUMENT_URI $document_uri;
fastcgi_param DOCUMENT_ROOT $document_root;
fastcgi_param SERVER_PROTOCOL $server_protocol;

fastcgi_param GATEWAY_INTERFACE CGI/1.1;
fastcgi_param SERVER_SOFTWARE nginx/$nginx_version;

fastcgi_param REMOTE_ADDR $remote_addr;
fastcgi_param REMOTE_PORT $remote_port;
fastcgi_param SERVER_ADDR $server_addr;
fastcgi_param SERVER_PORT $server_port;
fastcgi_param SERVER_NAME $server_name;

# PHP only, required if PHP was built with --enable-force-cgi-redirect
fastcgi_param REDIRECT_STATUS 200;
---------------------------------------------------------------------------------------------------------------------------------

Attachment Four [/etc/php/php-fpm.conf]
---------------------------------------------------------------------------------------------------------------------------------
<?xml version="1.0" ?>
<configuration>

All relative paths in this config are relative to php's install prefix

<section name="global_options">

Pid file
<value name="pid_file">/usr/local/logs/php-fpm.pid</value>

Error log file
<value name="error_log">/usr/local/logs/php-fpm.log</value>

Log level
<value name="log_level">notice</value>

When this amount of php processes exited with SIGSEGV or SIGBUS ...
<value name="emergency_restart_threshold">10</value>

... in a less than this interval of time, a graceful restart will be initiated.
Useful to work around accidental curruptions in accelerator's shared memory.
<value name="emergency_restart_interval">1m</value>

Time limit on waiting child's reaction on signals from master
<value name="process_control_timeout">5s</value>

Set to 'no' to debug fpm
<value name="daemonize">yes</value>

</section>

<workers>

<section name="pool">

Name of pool. Used in logs and stats.
<value name="name">default</value>

Address to accept fastcgi requests on.
Valid syntax is 'ip.ad.re.ss:port' or just 'port' or '/path/to/unix/socket'
<value name="listen_address">127.0.0.1:9000</value>

<value name="listen_options">

Set listen(2) backlog
<value name="backlog">-1</value>

Set permissions for unix socket, if one used.
In Linux read/write permissions must be set in order to allow connections from web server.
Many BSD-derrived systems allow connections regardless of permissions.
<value name="owner">nginx</value>
<value name="group">nginx</value>
<value name="mode">0666</value>
</value>

Additional php.ini defines, specific to this pool of workers.
<value name="php_defines">
<value name="sendmail_path">/usr/sbin/sendmail -t -i</value>
<value name="display_errors">0</value>
</value>

Unix user of processes
<value name="user">nginx</value>

Unix group of processes
<value name="group">nginx</value>

Process manager settings
<value name="pm">

Sets style of controling worker process count.
Valid values are 'static' and 'apache-like'
<value name="style">static</value>

Sets the limit on the number of simultaneous requests that will be served.
Equivalent to Apache MaxClients directive.
Equivalent to PHP_FCGI_CHILDREN environment in original php.fcgi
Used with any pm_style.
<value name="max_children">5</value>

Settings group for 'apache-like' pm style
<value name="apache_like">

Sets the number of server processes created on startup.
Used only when 'apache-like' pm_style is selected
<value name="StartServers">20</value>

Sets the desired minimum number of idle server processes.
Used only when 'apache-like' pm_style is selected
<value name="MinSpareServers">5</value>

Sets the desired maximum number of idle server processes.
Used only when 'apache-like' pm_style is selected
<value name="MaxSpareServers">35</value>

</value>

</value>

The timeout (in seconds) for serving a single request after which the worker process will be terminated
Should be used when 'max_execution_time' ini option does not stop script execution for some reason
'0s' means 'off'
<value name="request_terminate_timeout">0s</value>

The timeout (in seconds) for serving of single request after which a php backtrace will be dumped to slow.log file
'0s' means 'off'
<value name="request_slowlog_timeout">0s</value>

The log file for slow requests
<value name="slowlog">logs/slow.log</value>

Set open file desc rlimit
<value name="rlimit_files">1024</value>

Set max core size rlimit
<value name="rlimit_core">0</value>

Chroot to this directory at the start, absolute path
<value name="chroot"></value>

Chdir to this directory at the start, absolute path
<value name="chdir"></value>

Redirect workers' stdout and stderr into main error log.
If not set, they will be redirected to /dev/null, according to FastCGI specs
<value name="catch_workers_output">yes</value>

How much requests each process should execute before respawn.
Useful to work around memory leaks in 3rd party libraries.
For endless request processing please specify 0
Equivalent to PHP_FCGI_MAX_REQUESTS
<value name="max_requests">500</value>

Comma separated list of ipv4 addresses of FastCGI clients that allowed to connect.
Equivalent to FCGI_WEB_SERVER_ADDRS environment in original php.fcgi (5.2.2+)
Makes sense only with AF_INET listening socket.
<value name="allowed_clients">127.0.0.1</value>

Pass environment variables like LD_LIBRARY_PATH
All $VARIABLEs are taken from current environment
<value name="environment">
<value name="HOSTNAME">$HOSTNAME</value>
<value name="PATH">/usr/local/bin:/usr/bin:/bin</value>
<value name="TMP">/tmp</value>
<value name="TMPDIR">/tmp</value>
<value name="TEMP">/tmp</value>
<value name="OSTYPE">$OSTYPE</value>
<value name="MACHTYPE">$MACHTYPE</value>
<value name="MALLOC_CHECK_">2</value>
</value>

</section>

</workers>

</configuration>
---------------------------------------------------------------------------------------------------------------------------------

Attachment Five [error_log with debug output for browser requesting non-existing file]
---------------------------------------------------------------------------------------------------------------------------------
2010/08/08 11:20:52 [debug] 18647#0: *1 event timer del: 3: 1346458458
2010/08/08 11:20:52 [debug] 18647#0: *1 rewrite phase: 0
2010/08/08 11:20:52 [debug] 18647#0: *1 test location: "/"
2010/08/08 11:20:52 [debug] 18647#0: *1 test location: "favicon.ico"
2010/08/08 11:20:52 [debug] 18647#0: *1 test location: ~ "\.htm$"
2010/08/08 11:20:52 [debug] 18647#0: *1 using configuration "\.htm$"
2010/08/08 11:20:52 [debug] 18647#0: *1 http cl:-1 max:1048576
2010/08/08 11:20:52 [debug] 18647#0: *1 rewrite phase: 2
2010/08/08 11:20:52 [debug] 18647#0: *1 post rewrite phase: 3
2010/08/08 11:20:52 [debug] 18647#0: *1 generic phase: 4
2010/08/08 11:20:52 [debug] 18647#0: *1 generic phase: 5
2010/08/08 11:20:52 [debug] 18647#0: *1 generic phase: 6
2010/08/08 11:20:52 [debug] 18647#0: *1 access phase: 7
2010/08/08 11:20:52 [debug] 18647#0: *1 access phase: 8
2010/08/08 11:20:52 [debug] 18647#0: *1 post access phase: 9
2010/08/08 11:20:52 [debug] 18647#0: *1 http init upstream, client timer: 0
2010/08/08 11:20:52 [debug] 18647#0: *1 epoll add event: fd:3 op:3 ev:80000005
2010/08/08 11:20:52 [debug] 18647#0: *1 http script copy: "SCRIPT_FILENAME"
2010/08/08 11:20:52 [debug] 18647#0: *1 http script copy: "/srv/www/mutually4u.com/public_html"
2010/08/08 11:20:52 [debug] 18647#0: *1 http script var: "/test_htm.htm"
2010/08/08 11:20:52 [debug] 18647#0: *1 fastcgi param: "SCRIPT_FILENAME: /srv/www/mutually4u.com/public_html/test_htm.htm"
2010/08/08 11:20:52 [debug] 18647#0: *1 http script copy: "PATH_INFO"
2010/08/08 11:20:52 [debug] 18647#0: *1 http script var: "/test_htm.htm"
2010/08/08 11:20:52 [debug] 18647#0: *1 fastcgi param: "PATH_INFO: /test_htm.htm"
2010/08/08 11:20:52 [debug] 18647#0: *1 http script copy: "QUERY_STRING"
2010/08/08 11:20:52 [debug] 18647#0: *1 fastcgi param: "QUERY_STRING: "
2010/08/08 11:20:52 [debug] 18647#0: *1 http script copy: "REQUEST_METHOD"
2010/08/08 11:20:52 [debug] 18647#0: *1 http script var: "GET"
2010/08/08 11:20:52 [debug] 18647#0: *1 fastcgi param: "REQUEST_METHOD: GET"
2010/08/08 11:20:52 [debug] 18647#0: *1 http script copy: "CONTENT_TYPE"
2010/08/08 11:20:52 [debug] 18647#0: *1 fastcgi param: "CONTENT_TYPE: "
2010/08/08 11:20:52 [debug] 18647#0: *1 http script copy: "CONTENT_LENGTH"
2010/08/08 11:20:52 [debug] 18647#0: *1 fastcgi param: "CONTENT_LENGTH: "
2010/08/08 11:20:52 [debug] 18647#0: *1 http script copy: "SCRIPT_NAME"
2010/08/08 11:20:52 [debug] 18647#0: *1 http script var: "/test_htm.htm"
2010/08/08 11:20:52 [debug] 18647#0: *1 fastcgi param: "SCRIPT_NAME: /test_htm.htm"
2010/08/08 11:20:52 [debug] 18647#0: *1 http script copy: "REQUEST_URI"
2010/08/08 11:20:52 [debug] 18647#0: *1 http script var: "/test_htm.htm"
2010/08/08 11:20:52 [debug] 18647#0: *1 fastcgi param: "REQUEST_URI: /test_htm.htm"
2010/08/08 11:20:52 [debug] 18647#0: *1 http script copy: "DOCUMENT_URI"
2010/08/08 11:20:52 [debug] 18647#0: *1 http script var: "/test_htm.htm"
2010/08/08 11:20:52 [debug] 18647#0: *1 fastcgi param: "DOCUMENT_URI: /test_htm.htm"
2010/08/08 11:20:52 [debug] 18647#0: *1 http script copy: "DOCUMENT_ROOT"
2010/08/08 11:20:52 [debug] 18647#0: *1 http script var: "/srv/www/mutually4u.com/public_html"
2010/08/08 11:20:52 [debug] 18647#0: *1 fastcgi param: "DOCUMENT_ROOT: /srv/www/mutually4u.com/public_html"
2010/08/08 11:20:52 [debug] 18647#0: *1 http script copy: "SERVER_PROTOCOL"
2010/08/08 11:20:52 [debug] 18647#0: *1 http script var: "HTTP/1.1"
2010/08/08 11:20:52 [debug] 18647#0: *1 fastcgi param: "SERVER_PROTOCOL: HTTP/1.1"
2010/08/08 11:20:52 [debug] 18647#0: *1 http script copy: "GATEWAY_INTERFACE"
2010/08/08 11:20:52 [debug] 18647#0: *1 http script copy: "CGI/1.1"
2010/08/08 11:20:52 [debug] 18647#0: *1 fastcgi param: "GATEWAY_INTERFACE: CGI/1.1"
2010/08/08 11:20:52 [debug] 18647#0: *1 http script copy: "SERVER_SOFTWARE"
2010/08/08 11:20:52 [debug] 18647#0: *1 http script copy: "nginx/"
2010/08/08 11:20:52 [debug] 18647#0: *1 http script var: "0.8.47"
2010/08/08 11:20:52 [debug] 18647#0: *1 fastcgi param: "SERVER_SOFTWARE: nginx/0.8.47"
2010/08/08 11:20:52 [debug] 18647#0: *1 http script copy: "REMOTE_ADDR"
2010/08/08 11:20:52 [debug] 18647#0: *1 http script var: "122.174.127.181"
2010/08/08 11:20:52 [debug] 18647#0: *1 fastcgi param: "REMOTE_ADDR: 122.174.127.181"
2010/08/08 11:20:52 [debug] 18647#0: *1 http script copy: "REMOTE_PORT"
2010/08/08 11:20:52 [debug] 18647#0: *1 http script var: "2300"
2010/08/08 11:20:52 [debug] 18647#0: *1 fastcgi param: "REMOTE_PORT: 2300"
2010/08/08 11:20:52 [debug] 18647#0: *1 http script copy: "SERVER_ADDR"
2010/08/08 11:20:52 [debug] 18647#0: *1 http script var: "173.230.153.171"
2010/08/08 11:20:52 [debug] 18647#0: *1 fastcgi param: "SERVER_ADDR: 173.230.153.171"
2010/08/08 11:20:52 [debug] 18647#0: *1 http script copy: "SERVER_PORT"
2010/08/08 11:20:52 [debug] 18647#0: *1 http script var: "80"
2010/08/08 11:20:52 [debug] 18647#0: *1 fastcgi param: "SERVER_PORT: 80"
2010/08/08 11:20:52 [debug] 18647#0: *1 http script copy: "SERVER_NAME"
2010/08/08 11:20:52 [debug] 18647#0: *1 http script var: "www.mutually4u.com"
2010/08/08 11:20:52 [debug] 18647#0: *1 fastcgi param: "SERVER_NAME: www.mutually4u.com"
2010/08/08 11:20:52 [debug] 18647#0: *1 http script copy: "REDIRECT_STATUS"
2010/08/08 11:20:52 [debug] 18647#0: *1 http script copy: "200"
2010/08/08 11:20:52 [debug] 18647#0: *1 fastcgi param: "REDIRECT_STATUS: 200"
2010/08/08 11:20:52 [debug] 18647#0: *1 fastcgi param: "HTTP_HOST: www.mutually4u.com"
2010/08/08 11:20:52 [debug] 18647#0: *1 fastcgi param: "HTTP_CONNECTION: keep-alive"
2010/08/08 11:20:52 [debug] 18647#0: *1 fastcgi param: "HTTP_CACHE_CONTROL: max-age=0"
2010/08/08 11:20:52 [debug] 18647#0: *1 fastcgi param: "HTTP_ACCEPT: application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5"
2010/08/08 11:20:52 [debug] 18647#0: *1 fastcgi param: "HTTP_USER_AGENT: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/534.3 (KHTML, like Gecko) Chrome/6.0.466.0 Safari/534.3"
2010/08/08 11:20:52 [debug] 18647#0: *1 fastcgi param: "HTTP_ACCEPT_ENCODING: gzip,deflate,sdch"
2010/08/08 11:20:52 [debug] 18647#0: *1 fastcgi param: "HTTP_ACCEPT_LANGUAGE: en-US,en;q=0.8"
2010/08/08 11:20:52 [debug] 18647#0: *1 fastcgi param: "HTTP_ACCEPT_CHARSET: ISO-8859-1,utf-8;q=0.7,*;q=0.3"
2010/08/08 11:20:52 [debug] 18647#0: *1 http cleanup add: 092D03FC
2010/08/08 11:20:52 [debug] 18647#0: *1 get rr peer, try: 1
2010/08/08 11:20:52 [debug] 18647#0: *1 socket 11
2010/08/08 11:20:52 [debug] 18647#0: *1 epoll add connection: fd:11 ev:80000005
2010/08/08 11:20:52 [debug] 18647#0: *1 connect to 127.0.0.1:9000, fd:11 #2
2010/08/08 11:20:52 [debug] 18647#0: *1 http upstream connect: -2
2010/08/08 11:20:52 [debug] 18647#0: *1 event timer add: 11: 60000:1346458463
2010/08/08 11:20:52 [debug] 18647#0: *1 http finalize request: -4, "/test_htm.htm?" a:1, c:2
2010/08/08 11:20:52 [debug] 18647#0: *1 http request count:2 blk:0
2010/08/08 11:20:52 [debug] 18647#0: *1 http run request: "/test_htm.htm?"
2010/08/08 11:20:52 [debug] 18647#0: *1 http upstream check client, write event:1, "/test_htm.htm"
2010/08/08 11:20:52 [debug] 18647#0: *1 http upstream recv(): -1 (11: Resource temporarily unavailable)
2010/08/08 11:20:52 [debug] 18647#0: *1 http upstream request: "/test_htm.htm?"
2010/08/08 11:20:52 [debug] 18647#0: *1 http upstream send request handler
2010/08/08 11:20:52 [debug] 18647#0: *1 http upstream send request
2010/08/08 11:20:52 [debug] 18647#0: *1 chain writer buf fl:0 s:992
2010/08/08 11:20:52 [debug] 18647#0: *1 chain writer in: 092D0418
2010/08/08 11:20:52 [debug] 18647#0: *1 writev: 992
2010/08/08 11:20:52 [debug] 18647#0: *1 chain writer out: 00000000
2010/08/08 11:20:52 [debug] 18647#0: *1 event timer del: 11: 1346458463
2010/08/08 11:20:52 [debug] 18647#0: *1 event timer add: 11: 180000:1346578464
2010/08/08 11:20:52 [debug] 18647#0: *1 http upstream request: "/test_htm.htm?"
2010/08/08 11:20:52 [debug] 18647#0: *1 http upstream process header
2010/08/08 11:20:52 [debug] 18647#0: *1 malloc: 093189B0:131072
2010/08/08 11:20:52 [debug] 18647#0: *1 recv: fd:11 128 of 131072
2010/08/08 11:20:52 [debug] 18647#0: *1 http fastcgi record byte: 01
2010/08/08 11:20:52 [debug] 18647#0: *1 http fastcgi record byte: 06
2010/08/08 11:20:52 [debug] 18647#0: *1 http fastcgi record byte: 00
2010/08/08 11:20:52 [debug] 18647#0: *1 http fastcgi record byte: 01
2010/08/08 11:20:52 [debug] 18647#0: *1 http fastcgi record byte: 00
2010/08/08 11:20:52 [debug] 18647#0: *1 http fastcgi record byte: 65
2010/08/08 11:20:52 [debug] 18647#0: *1 http fastcgi record byte: 03
2010/08/08 11:20:52 [debug] 18647#0: *1 http fastcgi record byte: 00
2010/08/08 11:20:52 [debug] 18647#0: *1 http fastcgi record length: 101
2010/08/08 11:20:52 [debug] 18647#0: *1 http fastcgi parser: 0
2010/08/08 11:20:52 [debug] 18647#0: *1 http fastcgi header: "Status: 404 Not Found"
2010/08/08 11:20:52 [debug] 18647#0: *1 http fastcgi parser: 0
2010/08/08 11:20:52 [debug] 18647#0: *1 http fastcgi header: "X-Powered-By: PHP/5.2.14"
2010/08/08 11:20:52 [debug] 18647#0: *1 http fastcgi parser: 0
2010/08/08 11:20:52 [debug] 18647#0: *1 http fastcgi header: "Content-type: text/html"
2010/08/08 11:20:52 [debug] 18647#0: *1 http fastcgi parser: 1
2010/08/08 11:20:52 [debug] 18647#0: *1 http fastcgi header done
2010/08/08 11:20:52 [debug] 18647#0: *1 finalize http upstream request: 404
2010/08/08 11:20:52 [debug] 18647#0: *1 finalize http fastcgi request
2010/08/08 11:20:52 [debug] 18647#0: *1 free rr peer 1 0
2010/08/08 11:20:52 [debug] 18647#0: *1 close http upstream connection: 11
2010/08/08 11:20:52 [debug] 18647#0: *1 event timer del: 11: 1346578464
2010/08/08 11:20:52 [debug] 18647#0: *1 http finalize request: 404, "/test_htm.htm?" a:1, c:1
2010/08/08 11:20:52 [debug] 18647#0: *1 http special response: 404, "/test_htm.htm?"
2010/08/08 11:20:52 [debug] 18647#0: *1 internal redirect: "/error404.htm?"
2010/08/08 11:20:52 [debug] 18647#0: *1 rewrite phase: 0
2010/08/08 11:20:52 [debug] 18647#0: *1 test location: "/"
2010/08/08 11:20:52 [debug] 18647#0: *1 test location: "favicon.ico"
2010/08/08 11:20:52 [debug] 18647#0: *1 test location: "error404.htm"
2010/08/08 11:20:52 [debug] 18647#0: *1 test location: ~ "\.htm$"
2010/08/08 11:20:52 [debug] 18647#0: *1 using configuration "\.htm$"
2010/08/08 11:20:52 [debug] 18647#0: *1 http cl:-1 max:1048576
2010/08/08 11:20:52 [debug] 18647#0: *1 rewrite phase: 2
2010/08/08 11:20:52 [debug] 18647#0: *1 post rewrite phase: 3
2010/08/08 11:20:52 [debug] 18647#0: *1 generic phase: 4
2010/08/08 11:20:52 [debug] 18647#0: *1 generic phase: 5
2010/08/08 11:20:52 [debug] 18647#0: *1 generic phase: 6
2010/08/08 11:20:52 [debug] 18647#0: *1 access phase: 7
2010/08/08 11:20:52 [debug] 18647#0: *1 access phase: 8
2010/08/08 11:20:52 [debug] 18647#0: *1 post access phase: 9
2010/08/08 11:20:52 [debug] 18647#0: *1 posix_memalign: 092D0790:4096 @16
2010/08/08 11:20:52 [debug] 18647#0: *1 http init upstream, client timer: 0
2010/08/08 11:20:52 [debug] 18647#0: *1 http script copy: "SCRIPT_FILENAME"
2010/08/08 11:20:52 [debug] 18647#0: *1 http script copy: "/srv/www/mutually4u.com/public_html"
2010/08/08 11:20:52 [debug] 18647#0: *1 http script var: "/error404.htm"
2010/08/08 11:20:52 [debug] 18647#0: *1 fastcgi param: "SCRIPT_FILENAME: /srv/www/mutually4u.com/public_html/error404.htm"
2010/08/08 11:20:52 [debug] 18647#0: *1 http script copy: "PATH_INFO"
2010/08/08 11:20:52 [debug] 18647#0: *1 http script var: "/error404.htm"
2010/08/08 11:20:52 [debug] 18647#0: *1 fastcgi param: "PATH_INFO: /error404.htm"
2010/08/08 11:20:52 [debug] 18647#0: *1 http script copy: "QUERY_STRING"
2010/08/08 11:20:52 [debug] 18647#0: *1 fastcgi param: "QUERY_STRING: "
2010/08/08 11:20:52 [debug] 18647#0: *1 http script copy: "REQUEST_METHOD"
2010/08/08 11:20:52 [debug] 18647#0: *1 http script var: "GET"
2010/08/08 11:20:52 [debug] 18647#0: *1 fastcgi param: "REQUEST_METHOD: GET"
2010/08/08 11:20:52 [debug] 18647#0: *1 http script copy: "CONTENT_TYPE"
2010/08/08 11:20:52 [debug] 18647#0: *1 fastcgi param: "CONTENT_TYPE: "
2010/08/08 11:20:52 [debug] 18647#0: *1 http script copy: "CONTENT_LENGTH"
2010/08/08 11:20:52 [debug] 18647#0: *1 fastcgi param: "CONTENT_LENGTH: "
2010/08/08 11:20:52 [debug] 18647#0: *1 http script copy: "SCRIPT_NAME"
2010/08/08 11:20:52 [debug] 18647#0: *1 http script var: "/error404.htm"
2010/08/08 11:20:52 [debug] 18647#0: *1 fastcgi param: "SCRIPT_NAME: /error404.htm"
2010/08/08 11:20:52 [debug] 18647#0: *1 http script copy: "REQUEST_URI"
2010/08/08 11:20:52 [debug] 18647#0: *1 http script var: "/test_htm.htm"
2010/08/08 11:20:52 [debug] 18647#0: *1 fastcgi param: "REQUEST_URI: /test_htm.htm"
2010/08/08 11:20:52 [debug] 18647#0: *1 http script copy: "DOCUMENT_URI"
2010/08/08 11:20:52 [debug] 18647#0: *1 http script var: "/error404.htm"
2010/08/08 11:20:52 [debug] 18647#0: *1 fastcgi param: "DOCUMENT_URI: /error404.htm"
2010/08/08 11:20:52 [debug] 18647#0: *1 http script copy: "DOCUMENT_ROOT"
2010/08/08 11:20:52 [debug] 18647#0: *1 http script var: "/srv/www/mutually4u.com/public_html"
2010/08/08 11:20:52 [debug] 18647#0: *1 fastcgi param: "DOCUMENT_ROOT: /srv/www/mutually4u.com/public_html"
2010/08/08 11:20:52 [debug] 18647#0: *1 http script copy: "SERVER_PROTOCOL"
2010/08/08 11:20:52 [debug] 18647#0: *1 http script var: "HTTP/1.1"
2010/08/08 11:20:52 [debug] 18647#0: *1 fastcgi param: "SERVER_PROTOCOL: HTTP/1.1"
2010/08/08 11:20:52 [debug] 18647#0: *1 http script copy: "GATEWAY_INTERFACE"
2010/08/08 11:20:52 [debug] 18647#0: *1 http script copy: "CGI/1.1"
2010/08/08 11:20:52 [debug] 18647#0: *1 fastcgi param: "GATEWAY_INTERFACE: CGI/1.1"
2010/08/08 11:20:52 [debug] 18647#0: *1 http script copy: "SERVER_SOFTWARE"
2010/08/08 11:20:52 [debug] 18647#0: *1 http script copy: "nginx/"
2010/08/08 11:20:52 [debug] 18647#0: *1 http script var: "0.8.47"
2010/08/08 11:20:52 [debug] 18647#0: *1 fastcgi param: "SERVER_SOFTWARE: nginx/0.8.47"
2010/08/08 11:20:52 [debug] 18647#0: *1 http script copy: "REMOTE_ADDR"
2010/08/08 11:20:52 [debug] 18647#0: *1 http script var: "122.174.127.181"
2010/08/08 11:20:52 [debug] 18647#0: *1 fastcgi param: "REMOTE_ADDR: 122.174.127.181"
2010/08/08 11:20:52 [debug] 18647#0: *1 http script copy: "REMOTE_PORT"
2010/08/08 11:20:52 [debug] 18647#0: *1 http script var: "2300"
2010/08/08 11:20:52 [debug] 18647#0: *1 fastcgi param: "REMOTE_PORT: 2300"
2010/08/08 11:20:52 [debug] 18647#0: *1 http script copy: "SERVER_ADDR"
2010/08/08 11:20:52 [debug] 18647#0: *1 http script var: "173.230.153.171"
2010/08/08 11:20:52 [debug] 18647#0: *1 fastcgi param: "SERVER_ADDR: 173.230.153.171"
2010/08/08 11:20:52 [debug] 18647#0: *1 http script copy: "SERVER_PORT"
2010/08/08 11:20:52 [debug] 18647#0: *1 http script var: "80"
2010/08/08 11:20:52 [debug] 18647#0: *1 fastcgi param: "SERVER_PORT: 80"
2010/08/08 11:20:52 [debug] 18647#0: *1 http script copy: "SERVER_NAME"
2010/08/08 11:20:52 [debug] 18647#0: *1 http script var: "www.mutually4u.com"
2010/08/08 11:20:52 [debug] 18647#0: *1 fastcgi param: "SERVER_NAME: www.mutually4u.com"
2010/08/08 11:20:52 [debug] 18647#0: *1 http script copy: "REDIRECT_STATUS"
2010/08/08 11:20:52 [debug] 18647#0: *1 http script copy: "200"
2010/08/08 11:20:52 [debug] 18647#0: *1 fastcgi param: "REDIRECT_STATUS: 200"
2010/08/08 11:20:52 [debug] 18647#0: *1 fastcgi param: "HTTP_HOST: www.mutually4u.com"
2010/08/08 11:20:52 [debug] 18647#0: *1 fastcgi param: "HTTP_CONNECTION: keep-alive"
2010/08/08 11:20:52 [debug] 18647#0: *1 fastcgi param: "HTTP_CACHE_CONTROL: max-age=0"
2010/08/08 11:20:52 [debug] 18647#0: *1 fastcgi param: "HTTP_ACCEPT: application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5"
2010/08/08 11:20:52 [debug] 18647#0: *1 fastcgi param: "HTTP_USER_AGENT: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/534.3 (KHTML, like Gecko) Chrome/6.0.466.0 Safari/534.3"
2010/08/08 11:20:52 [debug] 18647#0: *1 fastcgi param: "HTTP_ACCEPT_ENCODING: gzip,deflate,sdch"
2010/08/08 11:20:52 [debug] 18647#0: *1 fastcgi param: "HTTP_ACCEPT_LANGUAGE: en-US,en;q=0.8"
2010/08/08 11:20:52 [debug] 18647#0: *1 fastcgi param: "HTTP_ACCEPT_CHARSET: ISO-8859-1,utf-8;q=0.7,*;q=0.3"
2010/08/08 11:20:52 [debug] 18647#0: *1 http cleanup add: 092D0C48
2010/08/08 11:20:52 [debug] 18647#0: *1 get rr peer, try: 1
2010/08/08 11:20:52 [debug] 18647#0: *1 socket 11
2010/08/08 11:20:52 [debug] 18647#0: *1 epoll add connection: fd:11 ev:80000005
2010/08/08 11:20:52 [debug] 18647#0: *1 connect to 127.0.0.1:9000, fd:11 #3
2010/08/08 11:20:52 [debug] 18647#0: *1 http upstream connect: -2
2010/08/08 11:20:52 [debug] 18647#0: *1 event timer add: 11: 60000:1346458464
2010/08/08 11:20:52 [debug] 18647#0: *1 http finalize request: -4, "/error404.htm?" a:1, c:3
2010/08/08 11:20:52 [debug] 18647#0: *1 http request count:3 blk:0
2010/08/08 11:20:52 [debug] 18647#0: *1 http finalize request: -4, "/error404.htm?" a:1, c:2
2010/08/08 11:20:52 [debug] 18647#0: *1 http request count:2 blk:0
2010/08/08 11:20:52 [debug] 18647#0: *1 http upstream request: "/error404.htm?"
2010/08/08 11:20:52 [debug] 18647#0: *1 http upstream send request handler
2010/08/08 11:20:52 [debug] 18647#0: *1 http upstream send request
2010/08/08 11:20:52 [debug] 18647#0: *1 chain writer buf fl:0 s:992
2010/08/08 11:20:52 [debug] 18647#0: *1 chain writer in: 092D0CE4
2010/08/08 11:20:52 [debug] 18647#0: *1 writev: 992
2010/08/08 11:20:52 [debug] 18647#0: *1 chain writer out: 00000000
2010/08/08 11:20:52 [debug] 18647#0: *1 event timer del: 11: 1346458464
2010/08/08 11:20:52 [debug] 18647#0: *1 event timer add: 11: 180000:1346578464
2010/08/08 11:20:52 [debug] 18647#0: *1 http upstream request: "/error404.htm?"
2010/08/08 11:20:52 [debug] 18647#0: *1 http upstream dummy handler
2010/08/08 11:20:52 [debug] 18647#0: *1 http upstream request: "/error404.htm?"
2010/08/08 11:20:52 [debug] 18647#0: *1 http upstream process header
2010/08/08 11:20:52 [debug] 18647#0: *1 malloc: 093389B8:131072
2010/08/08 11:20:52 [debug] 18647#0: *1 recv: fd:11 200 of 131072
2010/08/08 11:20:52 [debug] 18647#0: *1 http fastcgi record byte: 01
2010/08/08 11:20:52 [debug] 18647#0: *1 http fastcgi record byte: 06
2010/08/08 11:20:52 [debug] 18647#0: *1 http fastcgi record byte: 00
2010/08/08 11:20:52 [debug] 18647#0: *1 http fastcgi record byte: 01
2010/08/08 11:20:52 [debug] 18647#0: *1 http fastcgi record byte: 00
2010/08/08 11:20:52 [debug] 18647#0: *1 http fastcgi record byte: AA
2010/08/08 11:20:52 [debug] 18647#0: *1 http fastcgi record byte: 06
2010/08/08 11:20:52 [debug] 18647#0: *1 http fastcgi record byte: 00
2010/08/08 11:20:52 [debug] 18647#0: *1 http fastcgi record length: 170
2010/08/08 11:20:52 [debug] 18647#0: *1 http fastcgi parser: 0
2010/08/08 11:20:52 [debug] 18647#0: *1 http fastcgi header: "X-Powered-By: PHP/5.2.14"
2010/08/08 11:20:52 [debug] 18647#0: *1 http fastcgi parser: 0
2010/08/08 11:20:52 [debug] 18647#0: *1 http fastcgi header: "Content-type: text/html"
2010/08/08 11:20:52 [debug] 18647#0: *1 http fastcgi parser: 1
2010/08/08 11:20:52 [debug] 18647#0: *1 http fastcgi header done
2010/08/08 11:20:52 [debug] 18647#0: *1 HTTP/1.1 404 Not Found
Server: nginx/0.8.47
Date: Sun, 08 Aug 2010 05:50:52 GMT
Content-Type: text/html
Transfer-Encoding: chunked
Connection: keep-alive
X-Powered-By: PHP/5.2.14
Content-Encoding: gzip

2010/08/08 11:20:52 [debug] 18647#0: *1 write new buf t:1 f:0 092D0EC0, pos 092D0EC0, size: 212 file: 0, size: 0
2010/08/08 11:20:52 [debug] 18647#0: *1 http write filter: l:0 f:0 s:212
2010/08/08 11:20:52 [debug] 18647#0: *1 http cacheable: 0
2010/08/08 11:20:52 [debug] 18647#0: *1 http upstream process upstream
2010/08/08 11:20:52 [debug] 18647#0: *1 pipe read upstream: 1
2010/08/08 11:20:52 [debug] 18647#0: *1 pipe preread: 139
2010/08/08 11:20:52 [debug] 18647#0: *1 readv: 1:130872
2010/08/08 11:20:52 [debug] 18647#0: *1 pipe recv chain: 0
2010/08/08 11:20:52 [debug] 18647#0: *1 pipe buf free s:0 t:1 f:0 093389B8, pos 093389F5, size: 139 file: 0, size: 0
2010/08/08 11:20:52 [debug] 18647#0: *1 input buf #0 093389F5
2010/08/08 11:20:52 [debug] 18647#0: *1 http fastcgi record byte: 01
2010/08/08 11:20:52 [debug] 18647#0: *1 http fastcgi record byte: 03
2010/08/08 11:20:52 [debug] 18647#0: *1 http fastcgi record byte: 00
2010/08/08 11:20:52 [debug] 18647#0: *1 http fastcgi record byte: 01
2010/08/08 11:20:52 [debug] 18647#0: *1 http fastcgi record byte: 00
2010/08/08 11:20:52 [debug] 18647#0: *1 http fastcgi record byte: 08
2010/08/08 11:20:52 [debug] 18647#0: *1 http fastcgi record byte: 00
2010/08/08 11:20:52 [debug] 18647#0: *1 http fastcgi record byte: 00
2010/08/08 11:20:52 [debug] 18647#0: *1 http fastcgi record length: 8
2010/08/08 11:20:52 [debug] 18647#0: *1 http fastcgi sent end request
2010/08/08 11:20:52 [debug] 18647#0: *1 input buf 093389F5 117
2010/08/08 11:20:52 [debug] 18647#0: *1 pipe write downstream: 1
2010/08/08 11:20:52 [debug] 18647#0: *1 pipe write downstream flush in
2010/08/08 11:20:52 [debug] 18647#0: *1 http output filter "/error404.htm?"
2010/08/08 11:20:52 [debug] 18647#0: *1 http copy filter: "/error404.htm?"
2010/08/08 11:20:52 [debug] 18647#0: *1 http gzip filter
2010/08/08 11:20:52 [debug] 18647#0: *1 malloc: B7299008:270336
2010/08/08 11:20:52 [debug] 18647#0: *1 gzip alloc: n:1 s:5824 a:8192 p:B7299008
2010/08/08 11:20:52 [debug] 18647#0: *1 gzip alloc: n:32768 s:2 a:65536 p:B729B008
2010/08/08 11:20:52 [debug] 18647#0: *1 gzip alloc: n:32768 s:2 a:65536 p:B72AB008
2010/08/08 11:20:52 [debug] 18647#0: *1 gzip alloc: n:32768 s:2 a:65536 p:B72BB008
2010/08/08 11:20:52 [debug] 18647#0: *1 gzip alloc: n:16384 s:4 a:65536 p:B72CB008
2010/08/08 11:20:52 [debug] 18647#0: *1 gzip in: 092D10C0
2010/08/08 11:20:52 [debug] 18647#0: *1 gzip in_buf:092D1044 ni:093389F5 ai:117
2010/08/08 11:20:52 [debug] 18647#0: *1 malloc: 092D17A8:4096
2010/08/08 11:20:52 [debug] 18647#0: *1 deflate in: ni:093389F5 no:092D17A8 ai:117 ao:4096 fl:0 redo:0
2010/08/08 11:20:52 [debug] 18647#0: *1 deflate out: ni:09338A6A no:092D17A8 ai:0 ao:4096 rc:0
2010/08/08 11:20:52 [debug] 18647#0: *1 gzip in_buf:092D1044 pos:093389F5
2010/08/08 11:20:52 [debug] 18647#0: *1 gzip in: 00000000
2010/08/08 11:20:52 [debug] 18647#0: *1 http copy filter: 0 "/error404.htm?"
2010/08/08 11:20:52 [debug] 18647#0: *1 pipe write downstream done
2010/08/08 11:20:52 [debug] 18647#0: *1 event timer: 11, old: 1346578464, new: 1346578466
2010/08/08 11:20:52 [debug] 18647#0: *1 http upstream exit: 00000000
2010/08/08 11:20:52 [debug] 18647#0: *1 finalize http upstream request: 0
2010/08/08 11:20:52 [debug] 18647#0: *1 finalize http fastcgi request
2010/08/08 11:20:52 [debug] 18647#0: *1 free rr peer 1 0
2010/08/08 11:20:52 [debug] 18647#0: *1 close http upstream connection: 11
2010/08/08 11:20:52 [debug] 18647#0: *1 event timer del: 11: 1346578464
2010/08/08 11:20:52 [debug] 18647#0: *1 http upstream temp fd: -1
2010/08/08 11:20:52 [debug] 18647#0: *1 http output filter "/error404.htm?"
2010/08/08 11:20:52 [debug] 18647#0: *1 http copy filter: "/error404.htm?"
2010/08/08 11:20:52 [debug] 18647#0: *1 http gzip filter
2010/08/08 11:20:52 [debug] 18647#0: *1 gzip in: 092D1138
2010/08/08 11:20:52 [debug] 18647#0: *1 gzip in_buf:092D1104 ni:00000000 ai:0
2010/08/08 11:20:52 [debug] 18647#0: *1 deflate in: ni:00000000 no:092D17A8 ai:0 ao:4096 fl:4 redo:0
2010/08/08 11:20:52 [debug] 18647#0: *1 deflate out: ni:00000000 no:092D17FE ai:0 ao:4010 rc:1
2010/08/08 11:20:52 [debug] 18647#0: *1 gzip in_buf:092D1104 pos:00000000
2010/08/08 11:20:52 [debug] 18647#0: *1 free: B7299008
2010/08/08 11:20:52 [debug] 18647#0: *1 http chunk: 10
2010/08/08 11:20:52 [debug] 18647#0: *1 http chunk: 94
2010/08/08 11:20:52 [debug] 18647#0: *1 write old buf t:1 f:0 092D0EC0, pos 092D0EC0, size: 212 file: 0, size: 0
2010/08/08 11:20:52 [debug] 18647#0: *1 write new buf t:1 f:0 00000000, pos 092D11C8, size: 4 file: 0, size: 0
2010/08/08 11:20:52 [debug] 18647#0: *1 write new buf t:0 f:0 00000000, pos 080B6BC4, size: 10 file: 0, size: 0
2010/08/08 11:20:52 [debug] 18647#0: *1 write new buf t:1 f:0 092D17A8, pos 092D17A8, size: 94 file: 0, size: 0
2010/08/08 11:20:52 [debug] 18647#0: *1 write new buf t:0 f:0 00000000, pos 080AEA9C, size: 7 file: 0, size: 0
2010/08/08 11:20:52 [debug] 18647#0: *1 http write filter: l:1 f:1 s:327
2010/08/08 11:20:52 [debug] 18647#0: *1 http write filter limit 0
2010/08/08 11:20:52 [debug] 18647#0: *1 writev: 327
2010/08/08 11:20:52 [debug] 18647#0: *1 http write filter 00000000
2010/08/08 11:20:52 [debug] 18647#0: *1 http copy filter: 0 "/error404.htm?"
2010/08/08 11:20:52 [debug] 18647#0: *1 http finalize request: 0, "/error404.htm?" a:1, c:1
2010/08/08 11:20:52 [debug] 18647#0: *1 set http keepalive handler
2010/08/08 11:20:52 [debug] 18647#0: *1 http close request
2010/08/08 11:20:52 [debug] 18647#0: *1 http log handler
2010/08/08 11:20:52 [debug] 18647#0: *1 free: 092D17A8
2010/08/08 11:20:52 [debug] 18647#0: *1 free: 00000000
2010/08/08 11:20:52 [debug] 18647#0: *1 free: 093389B8
2010/08/08 11:20:52 [debug] 18647#0: *1 free: 093189B0
2010/08/08 11:20:52 [debug] 18647#0: *1 free: 092CF770, unused: 0
2010/08/08 11:20:52 [debug] 18647#0: *1 free: 092D0790, unused: 1151
2010/08/08 11:20:52 [debug] 18647#0: *1 event timer add: 3: 65000:1346463466
2010/08/08 11:20:52 [debug] 18647#0: *1 free: 092DF168
2010/08/08 11:20:52 [debug] 18647#0: *1 free: 092DF400
2010/08/08 11:20:52 [debug] 18647#0: *1 hc free: 00000000 0
2010/08/08 11:20:52 [debug] 18647#0: *1 hc busy: 00000000 0
2010/08/08 11:20:52 [debug] 18647#0: *1 tcp_nodelay
2010/08/08 11:20:52 [debug] 18647#0: *1 post event 092FEA08
2010/08/08 11:20:52 [debug] 18647#0: *1 delete posted event 092FEA08
2010/08/08 11:20:52 [debug] 18647#0: *1 http keepalive handler
2010/08/08 11:20:52 [debug] 18647#0: *1 malloc: 092DF168:1024
2010/08/08 11:20:52 [debug] 18647#0: *1 recv: fd:3 -1 of 1024
2010/08/08 11:20:52 [debug] 18647#0: *1 recv() not ready (11: Resource temporarily unavailable)
---------------------------------------------------------------------------------------------------------------------------------

I tried all combinations of error_page in / out of the location setting before and after the
fast_cgi options etc.. Even disabling gzip and fastcgi settings but even with a plain nginx
and separate mutually4u.com server config file, i am not able to see the redirect error404.htm
page on the browser. Directly accessing the error404.htm page works fine. I am using the
server version nginx/0.8.47 as seen in the debug output along with php 5.2.14 with APC and
memcache enabled. Even after spending more than 8 hours with various options I am clueless.
I also googled a lot of code to find the cause of this problem and also searched this forum,
but could not find the cause of this simple problem.

Any help will be most appreciated. Thank you.

Regards
Ganesh
Subject Author Posted

nginx 0.8.47 php-fpm error_page not working

nginx_newbie August 08, 2010 02:36AM

Re: nginx 0.8.47 php-fpm error_page not working

edogawaconan August 08, 2010 02:48AM

Re: nginx 0.8.47 php-fpm error_page not working

nginx_newbie August 09, 2010 12:35AM

Re: nginx 0.8.47 php-fpm error_page not working

Igor Sysoev August 09, 2010 05:22AM

Re: nginx 0.8.47 php-fpm error_page not working

Igor Sysoev August 08, 2010 02:54AM

Re: nginx 0.8.47 php-fpm error_page not working

nginx_newbie August 09, 2010 09:11AM

Re: nginx 0.8.47 php-fpm error_page not working

edogawaconan August 09, 2010 09:34AM

Re: nginx 0.8.47 php-fpm error_page not working

Igor Sysoev August 09, 2010 09:42AM

Re: nginx 0.8.47 php-fpm error_page not working - SOLVED

nginx_newbie August 09, 2010 12:27PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 157
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