Nginx 403 Forbidden

November 5, 2018 427 views
Nginx Ubuntu 18.04

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;

}


1 Answer

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.

Have another answer? Share your knowledge.