<h2>Background & Environment</h2>
I am attempting to deploy a Nginx server with PHP7.1-FPM, following the instructions <a href="https://deliciousbrains.com/hosting-wordpress-yourself-nginx-php-mysql/" rel="nofollow noreferrer">here</a> and <a href="https://deliciousbrains.com/hosting-wordpress-yourself-setting-up-sites/" rel="nofollow noreferrer">here</a>:
<ul>
<li>The server is Ubuntu
</li>
<li>Nginx version is
</li>
<li>PHP version is
</li>
</ul>
I am fairly new to all this, so compared to a seasoned linux admin, I am still somewhat ignorant of what's what, but I know enough to handle the basics.
<h2>The Issue</h2>
When I browse to a URL with as
I get a blank page. There is no entry in the nginx error log.
When I browse to a URL such as
I get a 404 error.
<h2>Tried so far</h2>
I have attempted the suggestions in the stackoverflow post <a href="https://stackoverflow.com/questions/15423500/nginx-showing-blank-php-pages?s=1|3.8737">here</a>. As far as I could tell, my configuration already has the suggested entries that people are saying fixed this problem for them.
I was not able to resolve the issue with those answers. As that post is a few years old, I am thinking perhaps requirements have changed since then.
<h2>My Nginx configuration</h2>
My
is:
The site's conf file is:
<h2>Logs</h2>
No entry is generated in the Nginx server or site log.
No relevant entry is recorded to the FPM log at
<h2>Question</h2>
I would like to know if there is anything obvious missing or wrong in this configuration, which would potentially result in php files not being parsed.
<h1>UPDATE</h1>
As per comment below, pasting here so anyone new sees it:
<blockquote>
I enabled
and went through the masses of log output
that produced. As far as I could tell, there were no issues being
reported. Well, no obvious
or
. So I created a
basic
file including a basic echo command, and also
phpinfo. The file worked fine. So I suspect the issue is something
else. Continuing to investigate.
</blockquote>
Consider this question on hold for now, whilst I look into some other possibilities for the blank pages issue.
I am attempting to deploy a Nginx server with PHP7.1-FPM, following the instructions <a href="https://deliciousbrains.com/hosting-wordpress-yourself-nginx-php-mysql/" rel="nofollow noreferrer">here</a> and <a href="https://deliciousbrains.com/hosting-wordpress-yourself-setting-up-sites/" rel="nofollow noreferrer">here</a>:
<ul>
<li>The server is Ubuntu
Code:
16.04
<li>Nginx version is
Code:
1.13.3
<li>PHP version is
Code:
PHP 7.1.9-1+ubuntu16.04.1+deb.sury.org+1 (cli) (built: Sep 2 2017 05:56:43) ( NTS )
</ul>
I am fairly new to all this, so compared to a seasoned linux admin, I am still somewhat ignorant of what's what, but I know enough to handle the basics.
<h2>The Issue</h2>
When I browse to a URL with as
Code:
inspired01.DOMAIN.com/application/
When I browse to a URL such as
Code:
inspired01.DOMAIN.com/application/index.php
<h2>Tried so far</h2>
I have attempted the suggestions in the stackoverflow post <a href="https://stackoverflow.com/questions/15423500/nginx-showing-blank-php-pages?s=1|3.8737">here</a>. As far as I could tell, my configuration already has the suggested entries that people are saying fixed this problem for them.
I was not able to resolve the issue with those answers. As that post is a few years old, I am thinking perhaps requirements have changed since then.
<h2>My Nginx configuration</h2>
My
Code:
nginx.conf
Code:
user inspired786;
worker_processes auto;
pid /run/nginx.pid;
include /etc/nginx/modules-enabled/*.conf;
events {
worker_connections 1024;
multi_accept on;
}
http {
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 25;
types_hash_max_size 2048;
server_tokens off;
client_max_body_size 64m;
include /etc/nginx/mime.types;
default_type application/octet-stream;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2; # Dropping SSLv3, ref: POODLE
ssl_prefer_server_ciphers on;
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;
gzip on;
gzip_disable "msie6";
gzip_proxied any;
gzip_comp_level 2;
gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;
# Virtual Host Configs
include /etc/nginx/conf.d/*.conf;
include /etc/nginx/sites-enabled/*;
server {
listen 80 default_server;
listen [::]:80 default_server;
server_name _;
return 444;
}
}
The site's conf file is:
Code:
server {
listen 80;
listen [::]:80;
server_name inspired01.DOMAIN.com;
access_log /home/inspired786/DOMAIN.com/logs/access.log;
error_log /home/inspired786/DOMAIN.com/logs/error.log;
root /home/inspired786/DOMAIN.com/public/;
index index.php;
location / {
try_files $uri $uri/ /index.php?$args;
}
location ~ \.php$ {
try_files $uri =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/run/php/php7.1-fpm.sock;
fastcgi_index index.php;
include fastcgi_params;
}
}
<h2>Logs</h2>
No entry is generated in the Nginx server or site log.
No relevant entry is recorded to the FPM log at
Code:
/var/log/php7.1-fpm.log
<h2>Question</h2>
I would like to know if there is anything obvious missing or wrong in this configuration, which would potentially result in php files not being parsed.
<h1>UPDATE</h1>
As per comment below, pasting here so anyone new sees it:
<blockquote>
I enabled
Code:
debug_connection
that produced. As far as I could tell, there were no issues being
reported. Well, no obvious
Code:
errors
Code:
warnings
basic
Code:
hello.php
phpinfo. The file worked fine. So I suspect the issue is something
else. Continuing to investigate.
</blockquote>
Consider this question on hold for now, whilst I look into some other possibilities for the blank pages issue.