Nginx 403 Forbidden

Posted November 5, 2018 1.1k views
NginxUbuntu 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;


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

        autoindex on;
        autoindex_exact_size off;


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.

1 answer

Its giving the message

Apache/2.4.29 (Ubuntu) Server at 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.

Submit an Answer