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: - - [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" - - [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:, 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?

This is my /etc/nginx/sites-available/dancortes.press server file:

server {
        listen 80;
        listen [::]:80;

        # SSL configuration
        # listen 443 ssl default_server;
        # listen [::]:443 ssl default_server;
        # include snippets/snakeoil.conf;

        root /var/www/dancortes.press/public_html;

        # Add index.php to the list if you are using PHP
        index index.php;

        server_name dancortes.press;

        include global/restrictions.conf;
        include global/wordpress.conf;

        location ~ \.php$ {
                include snippets/fastcgi-php.conf;
                fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;

  • Does the original WP that you were offering before still work? Do other sites offered work? If other one still works, are permissions and setup identical? read the config files... – pauljohn32 Oct 9 '17 at 3:19
  • @pauljohn32, this is what's frustrating. I have looked at config files all night long. The only difference is the /etc/nginx/sites-available/microurb.club does not have a include global/restrictions.conf; and include global/wordpress.conf; So I tried removing it from /etc/nginx/sites-available/dancortes.press and restarted and reloaded nginx and still nothing. – Daniel Oct 9 '17 at 3:24

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.

The issue was that in my DNS records I did not have it as a redirect but instead CNAME www dancortes.press, so in such a case I did have to change server_name to www.dancortes.press.


One way you can try remove index.html from /var/www/dancortes.press/public_html file. after that restart your nginx and check WP 1st installation

sudo rm -f /var/www/dancortes.press/public_html/index.html sudo service nginx restart sudo nginx -t

Hope work fine


  • School, I tried that and I am still not getting anything but the Nginx homepage. I even tried configuring correct permissions sudo find /var/www/dancortes.press/public_html/ -type d -exec chmod 775 {} \; && sudo find /var/www/dancortes.press/public_html/ -type f -exec chmod 664 {} \; – Daniel Oct 9 '17 at 2:06

You can have multiple names or expressions with the server_name directive for nginx.

If you're familiar with Apache, your configuration might have been ServerName dancortes.press with ServerAlias www.dancortes.press, provided the DNS records were adjusted with an A record for dancortes.press and a CNAME for www pointing to dancortes.press.

With nginx you can have, for example:

server_name dancortes.press www.dancortes.press


Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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