• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Resolved Force .htaccess error documents only

Hajime Tanaka

Regular Pleskian
Server operating system version
AlmaLinux 8.6 x86_64
Plesk version and microupdate number
18.0.43.1
I'm trying to disable `Custom error documents` from the Hosting settings. But just didn't work and redirected to default custom error by Plesk. Is there to force .htaccess error document only and disable or remove default Plesk error document possible?
 
I have to update this thread. It is a bug or unlikely issue in Apache 2.4 was something missing.. I found .htaccess that was changed from here,

Code:
Require all denied

to

Code:
Order deny,allow

Deny from all

[kepler@root~]$ httpd -v
Server version: Apache/2.4.37 (AlmaLinux)

1654625776682.png
Why apache version is still running on 2.4? And syntax hasn't changed yet? It is unlikely bug known possible?
 
What if you delete all of the error documents in the error_docs directory?
Back to this thread again, I've deleted this error_docs directory, and still the same shows `Under Maintenance` and a page like here screenshot... It's annoying so
 

Attachments

  • 1657399390686.png
    1657399390686.png
    80.5 KB · Views: 7
Bump this thread again, when we got an error and we can't see the full error because of that page Under maintenance `File not found` too, it's annoying so.. This won't force to .htaccess file. But only for Nginx, how is possible that?
 

It is now solved. Please close this thread and as marked solved.
 
To add to this, i had similar problems, Some solutions worked (ish) BUT not for all error codes.
After reading LOTS (and here of course). I found the solution through info i found and trial and error....

Here it is

Login to your plesk
1 Go to server management and turn off Nginx. (be aware this is SERVER WIDE!).
2 Go to the domain and Apache & Nginx Settings (if this is still showing Nginx details, restart server).
3 add “ProxyErrorOverride on” (without the quotes) to both Additional directives for HTTP & Additional directives for HTTPS.
4 click apply and OK.
NOW your .htaccess will take care of all errorDocuments, redirects, rewrites, etc.

5 In .htaccess add your ErrorDocments, i.e:
ErrorDocument 404 /404NotFound.php​
ErrorDocument 401 /login.php​

6 Restart server if needed
 

It is now solved. Please close this thread and as marked solved.
Hello Samet
Thanks for posting and helping. Unfortunately my situation was slightly different, but with the same results.
I posted above to help others, of how i fixed this
 
Back
Top