403 Forbidden - WordPress, Digital Ocean, Serverpilot & LetsEncrypt

Hi LetsEncrypt Community,

I have followed this guide to setup my LetsEncrypt SSL certificate on my Digital Ocean / Serverpilot / WordPress setup https://www.youtube.com/watch?v=d8cAz1jiJ1s and have successfully generated the certificate.


Visit my site https://www.xxxx.com I get a 403 Forbidden nginx error
Visit my site http://www.xxxx.com the site works perfectly

Does anyone have any advice? If you need to see a copy of the config / anything let me know

Thanks Phil

Can you provide your domain name so we can check ?

by the sound of things you have something configured incorrectly, but without more details I can’t really say what.

Hi Serverco,

Thanks for the reply - yes the domain name is hoy.co.uk


You probably need to go into your WP admin and change the settings there to use https rather than http.

Also the config file for your https is slightly incorrect ( it’s sending php rather than interpreting it if you go to https://hoy.co.uk/index.php ) and it’s not redirecting to index.php … I’d start by comparing the config for http and config for https and see what you are missing ( or paste the config file in pastebin.com for us, and provide a link )

Thank you once again :slight_smile:

Here is my config file http://pastebin.com/uZbZiLMy

Let me know what you see / what is missing

I meant your nginx config file, sorry - please delete the file you did paste

My apologies - Here is the hoy.ssl.conf file http://pastebin.com/yqiGKCCZ

Thanks :slight_smile: Can you paste the http nginx config as well please.

Here is the hoy.conf file http://pastebin.com/eAeRv9Zt

Thanks. Looking. I suggest deleting your first file ( rather than just editing it a little )

Boom sorted it!

it was the last lines…

    include /etc/nginx-sp/vhosts.d/hoy.d/*.nonssl_conf;
    include /etc/nginx-sp/vhosts.d/hoy.d/*.conf;

I had

    include /etc/nginx.sp/vhosts.d/hoy.d/*.nonssl_conf;
    include /etc/nginx.sp/vhosts.d/hoy.d/*.conf;

Thanks for all your help!

1 Like

Well spotted :slight_smile: the trivial difference between a “.” and a “-” :slight_smile: Glad to see it’s all working nicely :slight_smile:

hummmm I may have spoken too soon >.<

When I login hoy.co.uk/wp-login.php it downloads the wp-login.php file

Any advice on this one? Sorry to be a pain :confused:

hmm, working for me - https://www.hoy.co.uk/wp-login.php that wouldn’t usually be helped by clearing cache or restarting your browser - but may be worth a go.


Perfect haha >.<

Thanks again


This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.