Report this

What is the reason for this report?

Nginx 403 Forbidden

Posted on November 5, 2018

I’ve configured my Nginx and it gives a ‘403 Forbidden’ I have no idea why

this is my conf

server {
        listen 80;
        listen [::]:80;

        server_name daanvandalen.com;

        root /var/www/daanvandalen.com;
        index index.php index.html;
        location / {
                try_files $uri $uri/ =404;
        }

        autoindex on;
        autoindex_exact_size off;

}




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!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Its giving the message

Apache/2.4.29 (Ubuntu) Server at daanvandalen.com Port 443

So you are using https and should also be listening on port 443. I see you are using letsencrypt, this usually gives the option of modifying your config automatically to configure https. Perhaps you did not permit this when installing your certificates.

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.