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).
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');
chown -R www-data:www-data "$drt"/
chmod -R a-x,a=rX,u+w "$drt"/
systemctl restart nginx.service
/etc/init.d/php*-fpm restart
I get “entrance forbidden” when navigating to my domain in the browser.
No errors besides “entrance forbidden” appear in Nginx conf.
The DB user and the DB name are identical to one another and also identical to the app’s dir name
Entrance permitted.
Why is the entrance forbidden, given the above data? What I miss?
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
entrance coaching centre pathanamthitta provide the best coaching class for medical and engineering students. here working staffs are well knowledgeable and experienced. please visit us website.
Hi @benqzq920eee9010102b3d3c63, good to hear that you were able to solve this! Copying this over from your stack overflow follow-up just in case someone else lands on this page :)
I was able to solve it with this conf:
server {
root /var/www/html/domain.com;
server_name domain.com www.domain.com;
index index.php index.html index.htm;
location / {
try_files $uri $uri/ /index.php?q=$uri&$args;
}
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/run/php/php7.0-fpm.sock;
}
location ~* \.(jpg|jpeg|png|gif|ico|css|js|ttf|woff|pdf)$ {
expires 365d;
}
# managed by Certbot
listen 443 ssl http2; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/example.com/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/example.com/privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
}
server {
if ($host = www.example.com) {
return 301 https://$host$request_uri;
} # managed by Certbot
if ($host = example.com) {
return 301 https://$host$request_uri;
} # managed by Certbot
listen 80;
return 404; # managed by Certbot
}
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.