403 Forbidden - WordPress, Digital Ocean, Serverpilot & LetsEncrypt


#1

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.

But…

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


#2

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.


#3

Hi Serverco,

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


#4

Thanks.

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 )


#5

Thank you once again :slight_smile:

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

Let me know what you see / what is missing


#6

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


#7

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


#8

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


#9

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


#10

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


#11

Boom sorted it!

it was the last lines…

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

I had

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

Thanks for all your help!


#12

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


#13

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:


#14

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.


#15

Perfect haha >.<

Thanks again


#16

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