Nginx 403 forbidden custom page

Troblek

New member
Joined
Nov 3, 2024
Messages
2
Hi, as I currently have 403 Forbidden, however I would like to change it to my own, how do I do that. Thanks for any help
 
Hi, as I currently have 403 Forbidden, however I would like to change it to my own, how do I do that. Thanks for any help
Troblek, you don't really tell us anything about your configuration, & w/Nginx, configuration is the key. Basically getting rid of the 403 error involves placing a 'location' block in your configuration file, whether it be in your main one or one in sites-enabled or similar, & then instructing Nginx how the data is to be processed. You don't tell us what sort of data is throwing the 403 exception, so we can't really be more specific regarding our instructions. Good luck.
 
The configuration is standard after installing diredtadmin, I only added from this turtialhttps://www.cyberciti.biz/faq/linux-unix-nginx-access-control-howto/## Block spammers and other unwanted visitors ##include blockips.conf;It blocks well but I don't know where I can modify the 403.html file
 
Troblek, you don't really tell us anything about your configuration, & w/Nginx, configuration is the key. Basically getting rid of the 403 error involves placing a 'location' block in your configuration file, whether it be in your main one or one in sites-enabled or similar, & then instructing Nginx how the data is to be processed. You don't tell us what sort of data is throwing the 403 exception, so we can't really be more specific regarding our instructions. Good luck.
There may (or may not) be a 403.html file in your docroot folder, or in your Nginx folder if the docroot is not the same. If not, you're free to create 1. I hope I'm understanding your question correctly.
 
Back
Top