Question

*3 access forbidden by rule nginx

Posted October 23, 2021 66 views
Nginx

I have configured a server to run on the domain

https://stats.isaacsons.co.uk

This is using a LEMP droplet.

The homepage loads correctly, however all of the subpages give the error

access forbidden by rule nginx

This is a Laravel app, I have tested that php8.0-fpm is running. nginx all seems fine too.

Can anyone help guide in where best to find this alusive rule.

Thanks in advance

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.

×
Submit an Answer
1 answer

Hi there,

What this error means is that the request is dropped by the rules in the configuration file.

What I would recommend you do is you check the rules you specified in the configuration file. Maybe if you check for rules which start with Allow or Deny?

You can also check if you have added the index files after your root path in your server block. In order to do that first go to etc/nginx/sites-enabled, and then add the index files you wish to load after the root path. It should look something like this:

root /var/www/site;

index index.php index.html index.hml;

I hope that this helps and please let me know how it goes.

Regards,
Boyan