Domain name: zengzhang.in, below a 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 of the 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, below a 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 of the 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"-"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/ju N/2015:08:21:31-0400] "get/http/1.1"-"dnspod-monitor/2.0" 115.231.100.106--[12/jun/2015:08:22:27-0400] "G "et/http/1.1"-"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"-"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, please first check your index.php there is no problem, maybe you shut down all error output, this is the PHP parsing problem caused by blank page.
2, your try_files seems not quite the same as mine, mine is like this, has been working normally for several years
try_files $uri $uri/ /index.php?q=$uri&$args;
Just met the same problem that has been resolved.
I noticed that there are two of your configuration files root
, one in the second block, and the location
$document_root$fastcgi_script_name
value here $document_root
may not be what you expected /var/www/zengzhang.in/
, so try it. is to replace the second one location
. $document_root$fastcgi_script_name
/var/www/zengzhang.in/$fastcgi_script_name