Username:
TITLE
Custom 403 error document never shown for document root
PRODUCT, VERSION, OPERATING SYSTEM, ARCHITECTURE
Plesk 18.0.51
CentOS 7.9
PROBLEM DESCRIPTION
When a custom 403 error document is configured for a domain trough either a .htaccess file or the Additional Apache directives it's never shown when there is no index file for the document root of a domain. Instead the default apache welcome page is always shown (together with a 403 http response code of course). In other scenarios that trigger a 403 error within the document root, for example when the
Just to be clear, this issue only relates custom error documents for 403 errors in the document root of a domain.
I am aware that showing the default apache welcome page when there is no index file present in the document root and directory listing is prohibited is (or used to be) common behavior for Apache. However I would expect that a custom 403 error document to take precedence over the default apache welcome page as an error document.
STEPS TO REPRODUCE
Apache is used in Proxy Mode.
Scenario 1: no index files
1) Create domain in Plesk
2) Remove any index file from the document root of the domain
3) Create a custom error document for 403 error (403.html) in document root
4) Create .htaccess file add
5) Access domain via browser, notice how default apache welcome page is shown instead of custom error document
Scenario 2: SSLRequireSSL
1) Create domain in Plesk
2) Create a index.html file
3) Create a custom error document for 403 error (403.html) in document root
4) Create .htaccess file add code below to file
5) Disable "Permanent SEO-safe 301 redirect from HTTP to HTTPS" option from example.com > Hosting Settings
6) Access domain via unsecured connection (http) in browser, notice how default apache welcome page is shown instead of custom error document
ACTUAL RESULT
In all scenarios concerning the document root of a domain the default apache welcome is used as the 403 error document.
EXPECTED RESULT
A custom 403 error document should take precedence over the default apache welcome page as an error document.
ANY ADDITIONAL INFORMATION
Adding
YOUR EXPECTATIONS FROM PLESK SERVICE TEAM
Confirm bug
TITLE
Custom 403 error document never shown for document root
PRODUCT, VERSION, OPERATING SYSTEM, ARCHITECTURE
Plesk 18.0.51
CentOS 7.9
PROBLEM DESCRIPTION
When a custom 403 error document is configured for a domain trough either a .htaccess file or the Additional Apache directives it's never shown when there is no index file for the document root of a domain. Instead the default apache welcome page is always shown (together with a 403 http response code of course). In other scenarios that trigger a 403 error within the document root, for example when the
SSLRequireSSL
directive is used, a custom 403 error document isn't shown either.Just to be clear, this issue only relates custom error documents for 403 errors in the document root of a domain.
I am aware that showing the default apache welcome page when there is no index file present in the document root and directory listing is prohibited is (or used to be) common behavior for Apache. However I would expect that a custom 403 error document to take precedence over the default apache welcome page as an error document.
STEPS TO REPRODUCE
Apache is used in Proxy Mode.
Scenario 1: no index files
1) Create domain in Plesk
2) Remove any index file from the document root of the domain
3) Create a custom error document for 403 error (403.html) in document root
4) Create .htaccess file add
ErrorDocument 403 /403.html
rule to file5) Access domain via browser, notice how default apache welcome page is shown instead of custom error document
Scenario 2: SSLRequireSSL
1) Create domain in Plesk
2) Create a index.html file
3) Create a custom error document for 403 error (403.html) in document root
4) Create .htaccess file add code below to file
Code:
SSLRequireSSL
ErrorDocument 403 /403.html
6) Access domain via unsecured connection (http) in browser, notice how default apache welcome page is shown instead of custom error document
ACTUAL RESULT
In all scenarios concerning the document root of a domain the default apache welcome is used as the 403 error document.
EXPECTED RESULT
A custom 403 error document should take precedence over the default apache welcome page as an error document.
ANY ADDITIONAL INFORMATION
Adding
ProxyErrorOverride on
to the Additional Apache directives doesn't seem to have any effect.YOUR EXPECTATIONS FROM PLESK SERVICE TEAM
Confirm bug
Last edited: