By Mehdifaik
I’m install Wordpress in CentOS 6 (Nginx) After installed SSL Certificat I stumble In error 403 Forbidden nginx/1.12.0 ?
/etc/nginx/Conf.d/ssl.conf
server { listen 443; server_name Sitename.com www.Sitename.com;
ssl on; ssl_certificate /etc/ssl/server_chain.crt; ssl_certificate_key /etc/nginx/ssl/server.key;
access_log /var/log/nginx/nginx.vhost.access.log; error_log /var/log/nginx/nginx.vhost.error.log;
location / {
root /var/www/; index index.html; }
}
Please Help Me ?
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!
Problem in /etc/nginx/Conf.d/ssl.conf When you change
location / {
root /var/www/;
index index.html;
}
}
to
location / {
root /var/www/**html**;
index index.**php**;
}
}
The page loads as file for download (/var/www/html/index.php)
Hi @Mehdifaik
Can you please post your server block configuration, which should be located in /etc/nginx/sites-enabled/. You can replace your domain with domain.com if you want.
Are you using Let’s Encrypt for SSL or some other certificate provider?
Post the output of error log, use this command to get the last 20 lines:
tail -20 /var/log/nginx/error.log
So we can help you.
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.