403 error and wsod on new wordpress LEMP install

August 10, 2016 519 views
WordPress Ubuntu 16.04

I followed https://www.digitalocean.com/community/tutorials/how-to-install-wordpress-with-lemp-on-ubuntu-16-04 to the letter. All (eventually) went ok. Except it doesn't work. I cannot access wordpress at all. bell-computing.com/wp-admin gives 403 error and .../index.php just a white screen. I logged into mysql did 'use wordpress' (my db name), then changed my user password and confirmed the new one worked (logged otu and backin) and made the correct change in wp-config too. I have also tried my ip address with the same results. fwiw I installed phpmyadmin which also give wsod.

I renamed wp-config.php and got the wp prompt to enter the details but it said it couldn't create it, so I renamed it back again and double checked its contents.

2 comments
  • Hi!

    Can you please post the last few lines of nginx's error log?

    sudo tail -30 /var/log/nginx/error.log
    
  • here you go
    patbell@bell-computing-512mb-01:~$ sudo tail -30 /var/log/nginx/error.log
    2016/08/09 08:51:57 [notice] 12561#12561: signal process started
    2016/08/10 12:25:36 [emerg] 17495#17495: unexpected "}" in /etc/nginx/sites-enabled/default:54
    2016/08/10 12:25:58 [emerg] 17499#17499: "server_name" directive is not allowed here in /etc/nginx/sites-enabled/default:48
    2016/08/10 12:29:57 [notice] 17555#17555: signal process started
    2016/08/10 14:56:12 [error] 17559#17559: *39 directory index of "/var/www/html/wp-admin/" is forbidden, client: 80.14.167.250, server: bell-computing.com, request: "GET /wp-admin/ HTTP/1.1", host: "bell-computing.com"
    2016/08/10 15:19:38 [error] 17559#17559: *43 directory index of "/var/www/html/wp-admin/" is forbidden, client: 80.14.167.250, server: bell-computing.com, request: "GET /wp-admin/ HTTP/1.1", host: "bell-computing.com"
    2016/08/10 15:22:17 [error] 17559#17559: *48 directory index of "/var/www/html/wp-admin/" is forbidden, client: 80.14.167.250, server: bell-computing.com, request: "GET /wp-admin/ HTTP/1.1", host: "bell-computing.com", referrer: "http://bell-computing.com/wp-login.php"
    2016/08/10 16:58:36 [error] 17559#17559: *68 directory index of "/var/www/html/wp-admin/" is forbidden, client: 80.14.167.250, server: bell-computing.com, request: "GET /wp-admin/ HTTP/1.1", host: "bell-computing.com"
    2016/08/10 17:01:28 [error] 17559#17559: *71 directory index of "/var/www/html/wp-admin/" is forbidden, client: 80.14.167.250, server: bell-computing.com, request: "GET /wp-admin/ HTTP/1.1", host: "bell-computing.com"
    2016/08/10 17:01:38 [error] 17559#17559: *71 FastCGI sent in stderr: "PHP message: PHP Parse error: syntax error, unexpected ';', expecting ',' or ')' in /var/www/html/wp-config.php on line 29" while reading response header from upstream, client: 80.14.167.250, server: bell-computing.com, request: "GET /index.php HTTP/1.1", upstream: "fastcgi://unix:/run/php/php7.0-fpm.sock:", host: "bell-computing.com"
    2016/08/10 17:20:04 [error] 17559#17559: *73 FastCGI sent in stderr: "PHP message: PHP Parse error: syntax error, unexpected ';', expecting ',' or ')' in /var/www/html/wp-config.php on line 29" while reading response header from upstream, client: 80.14.167.250, server: bell-computing.com, request: "GET /phpmyadmin HTTP/1.1", upstream: "fastcgi://unix:/run/php/php7.0-fpm.sock:", host: "bell-computing.com"
    2016/08/10 17:24:01 [error] 17559#17559: *75 directory index of "/var/www/html/wp-admin/" is forbidden, client: 80.14.167.250, server: bell-computing.com, request: "GET /wp-admin/ HTTP/1.1", host: "bell-computing.com"
    2016/08/10 17:24:11 [error] 17559#17559: *75 FastCGI sent in stderr: "PHP message: PHP Parse error: syntax error, unexpected ';', expecting ',' or ')' in /var/www/html/wp-config.php on line 29" while reading response header from upstream, client: 80.14.167.250, server: bell-computing.com, request: "GET /index.php HTTP/1.1", upstream: "fastcgi://unix:/run/php/php7.0-fpm.sock:", host: "bell-computing.com"
    2016/08/10 17:26:47 [error] 17559#17559: *80 directory index of "/var/www/html/wp-admin/" is forbidden, client: 80.14.167.250, server: bell-computing.com, request: "GET /wp-admin/ HTTP/1.1", host: "bell-computing.com"
    2016/08/10 18:11:57 [error] 2455#2455: *2 directory index of "/var/www/html/wp-admin/" is forbidden, client: 80.14.167.250, server: bell-computing.com, request: "GET /wp-admin/ HTTP/1.1", host: "178.62.32.218"
    2016/08/10 18:12:10 [error] 2455#2455: *2 FastCGI sent in stderr: "PHP message: PHP Parse error: syntax error, unexpected ';', expecting ',' or ')' in /var/www/html/wp-config.php on line 29" while reading response header from upstream, client: 80.14.167.250, server: bell-computing.com, request: "GET /index.php/ HTTP/1.1", upstream: "fastcgi://unix:/run/php/php7.0-fpm.sock:", host: "178.62.32.218"
    2016/08/10 20:00:10 [error] 2455#2455: *9 FastCGI sent in stderr: "PHP message: PHP Parse error: syntax error, unexpected ';', expecting ',' or ')' in /var/www/html/wp-config.php on line 29" while reading response header from upstream, client: 4.35.86.69, server: bell-computing.com, request: "GET /wp-admi HTTP/1.1", upstream: "fastcgi://unix:/run/php/php7.0-fpm.sock:", host: "bell-computing.com"
    2016/08/10 20:00:13 [error] 2455#2455: *9 directory index of "/var/www/html/wp-admin/" is forbidden, client: 4.35.86.69, server: bell-computing.com, request: "GET /wp-admin/ HTTP/1.1", host: "bell-computing.com"

Be the first one to answer this question.