Hello, I am looking for clues why I can’t resolve 403 error.
My domain is:walkaboutmaps.org on Nginx on Linode VPN. I followed this tutorial and added Letsencrypt certificate to an existing Wordpress site. It continuously shows Forbidden 403 page no matter what settings I change. I’ve installed Certificates twice, last time using this link
I run Letsencrypt client as root, wordpress have 755 and 644 premissions for foiles and folders, owned by www-data, who also is running Nginx. I have multiple wordpress sites on the VPN, have not converted them to HTTP yet and they all are working fine, using the same global/wordpress.conf; and global/restrictions.conf;
I have had previously on one of the non-wordpress sites a StartSSl certificate, which has expiered and I have removed and disabled it, not sure if this can relate since the domains are different…
Also I am getting this error:
2017/04/18 16:54:49 [error] 16929#16929: *1 directory index of “/var/www/html/hosted/walkaboutmaps.org/” is forbidden, client: 107.3.185.55, server: walkaboutmaps.org, request: “GET / HTTP/2.0”, host: “walkaboutmaps.org”
I’ve tried swapping Walkaboutmaps.org directory with a fresh/clean wordpress directory, same result. So, it is not word press fault? But then I can run PHP test from the inside of the site directory (https://walkaboutmaps.org/test.php) without problems… So, what is the problem?
Hi @ahaw021, here is my Nginx config. I am new to Nginx have not tinkered with it much. Am I missing anything in the config?
indent preformatted text by 4 spaces
server {
listen 80;
listen [::]:80;
server_name walkaboutmaps.org www.walkaboutmaps.org;
return 301 https://$server_name$request_uri;
root /var/www/html/hosted/walkaboutmaps.org;
index index.php;
# Redirect all HTTP requests to HTTPS with a 301 Moved Permanently response.
# return 301 https://$server_name$request_uri;
# Uncoment line below when installing sertificate to Include location directive for Let's Encrypt ACME Challenge
include global/letsencrypt-acme-challenge.conf;
# Additional rules go here.
include global/restrictions.conf;
include global/wordpress.conf;
}
server {
# SSL configuration
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name walkaboutmaps.org www.walkaboutmaps.org;
root /var/www/html/hosted/walkaboutmaps.org;
include global/restrictions.conf;
include global/wordpress.conf;
ssl_certificate /etc/letsencrypt/live/walkaboutmaps.org/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/walkaboutmaps.org/privkey.pem;
# from https://cipherli.st/
# and https://raymii.org/s/tutorials/Strong_SSL_Security_On_nginx.html
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_prefer_server_ciphers on;
ssl_ciphers "EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH";
ssl_ecdh_curve secp384r1;
ssl_session_cache shared:SSL:10m;
ssl_session_tickets off;
ssl_stapling on;
ssl_stapling_verify on;
resolver 8.8.8.8 8.8.4.4 valid=300s;
resolver_timeout 5s;
# Disable preloading HSTS for now. You can use the commented out header line that includes
# the "preload" directive if you understand the implications.
# add_header Strict-Transport-Security "max-age=63072000; includeSubdomains; preload";
add_header Strict-Transport-Security "max-age=63072000; includeSubdomains";
add_header X-Frame-Options DENY;
add_header X-Content-Type-Options nosniff;
ssl_dhparam /etc/ssl/certs/dhparam.pem;
}
I am unable to get the site load in http, it keeps changing to https, including with www. prefix… I even tried a brand new install of a different browser, with same result. I am beginning to think Wordpress was not meant for providing SSL support…
rather than making silly comments like “Wordpress was not meant for providing SSL support” focus on the problem at hand
there are plenty of SSL Protected Wordpress websites out there
something is redirecting your traffic from HTTP to HTTPS - you need to figure out if it’s NGINX or WordPress and once you have found out what it is reverse the behavior
I agree. I am just frustrated. Will do as you suggested.
Edit: I managed to reverse it back to http and can login into admin. I’ll continue tomorrow with a new attempt to use SSL certificate. Thanks Andrei. I’ll report here how it goes.