I have an nginx web server that runs a Laravel application. The web.config and .htacces pages are forbidden pages. When I access the page, I get a 403(nginx) error. Instead, I want a custom html page to be displayed. How can this be done achieved?
Asked
Active
Viewed 352 times
1 Answers
2
With a statement like the following (e.g. in the server
block) where /403.html
refers to your error page you want to display.
error_page 403 /403.html;
https://nginx.org/en/docs/http/ngx_http_core_module.html#error_page

Sven
- 98,649
- 14
- 180
- 226