On Ubuntu 16.04 with Bash I've established LEMP and I can't access a WordPress app from browser although DB data is according (as I recall), and document root app dir has the right permissions (see below).
Nginx conf
- nginx.conf (all default).
- nginx default (all default).
- Nginx app conf (seven first lines are mine - the rest is Certbot).
WordPress app wp-config.php
This is the only part I changed in wp-config.php
:
define('DB_NAME', 'example.com');
define('DB_USER', 'example.com');
define('DB_PASSWORD', 'example.password');
My resets before testing
chown -R www-data:www-data /var/www/html/
chmod -R a-x,a=rX,u+w /var/www/html/
systemctl restart nginx.service
/etc/init.d/php*-fpm restart
Nginx logs
I checked all three Nginx logs (-t
,access
and error
). The first two logs output no error, but error
outputs this:
directory index of "/var/www/html/example.com/" is forbidden
My question
Why is the entrance forbidden, given the above data? What I miss?
Notes:
- This problem is unique to the WordPress app. It doesn't happen with the non-HTTPS, PHPmyadmin app.
- The DB user and the DB name of the WordPress app are identical to one another and also identical to the app's dir name.
/var/log/nginx/error.log
) – IsThisJavascript Mar 6 '18 at 10:44