Nginxaccess_log shows access 200, but the page is blank

Source: Internet
Author: User
Domain Name: zengzhang. in, the nginx configuration of the following wordpress program is as follows: {code ...} some access logs are as follows: {code ...} domain Name: zengzhang. in, the following wordpress Program
The nginx configuration is as follows:

server {    listen       80;    server_name  zengzheng.in;    error_log /var/log/nginx/binge-error.log;    access_log /var/log/nginx/binge-access.log;    root   /var/www/zengzhang.in/;    index index.php index.html index.htm;    location / {        try_files $uri $uri/ =404;    }    error_page 404 /404.html;    error_page 500 502 503 504 /50x.html;    location = /50x.html {        root /usr/share/nginx/www;    }    location ~ \.php$ {        try_files $uri =404;        fastcgi_pass unix:/var/run/php5-fpm.sock;        fastcgi_index index.php;        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;        include fastcgi_params;    }}

Some access logs are as follows:

115.231.100.106 - - [12/Jun/2015:08:21:01 -0400] "GET / HTTP/1.1" 200 31 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2272.118 Safari/537.36"115.231.100.106 - - [12/Jun/2015:08:21:02 -0400] "GET /favicon.ico HTTP/1.1" 200 31 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2272.118 Safari/537.36"101.226.73.30 - - [12/Jun/2015:08:21:31 -0400] "GET / HTTP/1.1" 200 31 "-" "DNSPod-Monitor/2.0"115.231.100.106 - - [12/Jun/2015:08:22:27 -0400] "GET / HTTP/1.1" 200 31 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2272.118 Safari/537.36"115.231.100.106 - - [12/Jun/2015:08:22:28 -0400] "GET /favicon.ico HTTP/1.1" 200 31 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2272.118 Safari/537.36"

Reply content:

Domain Name: zengzhang. in, the following wordpress Program
The nginx configuration is as follows:

server {    listen       80;    server_name  zengzheng.in;    error_log /var/log/nginx/binge-error.log;    access_log /var/log/nginx/binge-access.log;    root   /var/www/zengzhang.in/;    index index.php index.html index.htm;    location / {        try_files $uri $uri/ =404;    }    error_page 404 /404.html;    error_page 500 502 503 504 /50x.html;    location = /50x.html {        root /usr/share/nginx/www;    }    location ~ \.php$ {        try_files $uri =404;        fastcgi_pass unix:/var/run/php5-fpm.sock;        fastcgi_index index.php;        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;        include fastcgi_params;    }}

Some access logs are as follows:

115.231.100.106 - - [12/Jun/2015:08:21:01 -0400] "GET / HTTP/1.1" 200 31 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2272.118 Safari/537.36"115.231.100.106 - - [12/Jun/2015:08:21:02 -0400] "GET /favicon.ico HTTP/1.1" 200 31 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2272.118 Safari/537.36"101.226.73.30 - - [12/Jun/2015:08:21:31 -0400] "GET / HTTP/1.1" 200 31 "-" "DNSPod-Monitor/2.0"115.231.100.106 - - [12/Jun/2015:08:22:27 -0400] "GET / HTTP/1.1" 200 31 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2272.118 Safari/537.36"115.231.100.106 - - [12/Jun/2015:08:22:28 -0400] "GET /favicon.ico HTTP/1.1" 200 31 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2272.118 Safari/537.36"

1. Check whether your index. php has any problems. Maybe you have disabled all error outputs. This is a blank page caused by a problem in php parsing.

2. Your try_files seem to be different from mine. I have been working normally for several years.

try_files $uri $uri/ /index.php?q=$uri&$args;

The same problem has just been solved.
I noticed that your configuration file contains tworoot, SecondlocationThere is$document_root$fastcgi_script_name; Here$document_rootThe value may not be what you expected./var/www/zengzhang.in/To change it to this value. The secondlocationIn$document_root$fastcgi_script_nameChange/var/www/zengzhang.in/$fastcgi_script_name

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.