Skip to content

Server level custom error pages not working. #460

@amirhmoradi

Description

@amirhmoradi

Hi :)
In my setup, I want to show a custom error page when mod security (owasp) throws an error like 403.
I use openlitespeed.

How can I make this happen?
I tried putting custome error pages on the server config level (httpd_conf.conf) with no success like this:

context /error.html {
    location  /var/www/vhosts/localhost/html/error.html
    allowBrowse           1
    indexFiles error.html
}
include /usr/local/lsws/conf/custom_error_pages.conf

I tried also putting the custom error pages on vhost level, no success...

I found that the 403 pages come out of httpsstatuscode.cpp

"<br>Proudly powered by LiteSpeed Web Server"
.

Please advise :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions