-2

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?

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.