0

I am trying to install a second WP site on an Ubuntu 16 server running Nginx. I have successfully installed WordPress according to my server results, but I still only get the Nginx home page. I thought it might be the fact that the Group Owner was the User, so I changed group owner on web files to www-data:

microurb@vps148370:/var/www/dancortes.press/public_html$ ls -l
total 192
-rw-r--r--  1 microurb www-data     0 Oct  5 15:36 index.html
-rw-rw-r--  1 microurb www-data   418 Oct  8 17:07 index.php
-rw-rw-r--  1 microurb www-data 19935 Oct  8 17:07 license.txt
-rw-rw-r--  1 microurb www-data  7413 Oct  8 17:07 readme.html
-rw-rw-r--  1 microurb www-data  5447 Oct  8 17:07 wp-activate.php
drwxrwxr-x  9 microurb www-data  4096 Oct  8 17:07 wp-admin
-rw-rw-r--  1 microurb www-data   364 Oct  8 17:07 wp-blog-header.php
-rw-rw-r--  1 microurb www-data  1627 Oct  8 17:07 wp-comments-post.php
-rw-rw-r--  1 microurb www-data  2599 Oct  8 17:17 wp-config.php
-rw-rw-r--  1 microurb www-data  2853 Oct  8 17:07 wp-config-sample.php
drwxrwxr-x  5 microurb www-data  4096 Oct  8 17:19 wp-content
-rw-rw-r--  1 microurb www-data  3286 Oct  8 17:07 wp-cron.php
drwxrwxr-x 18 microurb www-data 12288 Oct  8 17:07 wp-includes
-rw-rw-r--  1 microurb www-data  2422 Oct  8 17:07 wp-links-opml.php
-rw-rw-r--  1 microurb www-data  3301 Oct  8 17:07 wp-load.php
-rw-rw-r--  1 microurb www-data 34327 Oct  8 17:07 wp-login.php
-rw-rw-r--  1 microurb www-data  8048 Oct  8 17:07 wp-mail.php
-rw-rw-r--  1 microurb www-data 16200 Oct  8 17:07 wp-settings.php
-rw-rw-r--  1 microurb www-data 29924 Oct  8 17:07 wp-signup.php
-rw-rw-r--  1 microurb www-data  4513 Oct  8 17:07 wp-trackback.php
-rw-rw-r--  1 microurb www-data  3065 Oct  8 17:07 xmlrpc.php

Still, I get only Nginx home page. I restarted Nginx a couple times.

I checked access and error logs and all I get is an error about code on the first site.

I checked the nginx access logs:

73.197.81.232 - - [08/Oct/2017:19:10:55 -0400] "GET / HTTP/1.1" 304 0 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36"
73.197.81.232 - - [08/Oct/2017:19:10:56 -0400] "GET / HTTP/1.1" 304 0 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36"

The error logs have an error regarding code on my first site:

PHP message: PHP Notice:  Undefined index: success in /var/www/microurb.com/public_html/index.php on line 295" while reading upstream, client: 71.168.149.103, server: microurb.club, request: "GET / HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php7.0-fpm.sock:", host: "microurb.club"
2017/10/08 19:10:01 [alert] 22798#22798: *25 open socket #11 left in connection 3
2017/10/08 19:10:01 [alert] 22798#22798: aborting
2017/10/08 19:10:52 [alert] 23108#23108: *3 open socket #3 left in connection 3
2017/10/08 19:10:52 [alert] 23108#23108: aborting

I really do not know what to look for next. Why can I not see the WP site?

I decided to do an nginx -t and got this:

microurb@vps148370:/etc/nginx/sites-available$ nginx -t
nginx: [alert] could not open error log file: open() "/var/log/nginx/error.log" failed (13: Permission denied)
2017/10/08 19:41:25 [warn] 23341#23341: the "user" directive makes sense only if the master process runs with super-user privileges, ignored in /etc/nginx/nginx.conf:1
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
2017/10/08 19:41:25 [emerg] 23341#23341: open() "/run/nginx.pid" failed (13: Permission denied)
nginx: configuration file /etc/nginx/nginx.conf test failed

I am not that much more enlightened now as to what is going on.

0

You need to delete file index.html. Once that is gone, index.php will work and WP will load.

0

So after spending hours poring over the config files, I decided to try the one thing that someone suggested I not do, which is to change server_name from dancortes.press to www.dancortes.press. When I did that, the problem was solved. I can now view my the WordPress 4.8 core files I downloaded.

I learned that the reason I was instructed not to do so was because it was understood on the DNS side that this was a redirect, but it was not. This is a CNAME config on the DNS side of things.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.