• The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

permanently removing 401 directive from one domain

C

chilihost

Guest
I have a domain that runs software which requires that he has no 401 ErrorDocument directive, however, it still requires the other ErrorDocument directives (404 in particular).

I have manually removed this entry out of the httpd.include file for this domain and it works fine. However, every once in a while plesk seems to overwrite this file and re-add in that directive. I know that you are never supposed to edit this file for that very reason, and supposed to keep edits to the vhost.conf file. However, due to the requirement I can't see any other way to remove the 401 directive but keep the other directives in place.

Does anyone know of a way to permanently keep that 401 directive from coming back, possibly overwriting some master template file or possibly setting this file to read only or maybe even dropping the ErrorDocument option and entering the required directives into the vhost.conf file instead?

thanks for your help!

Luke
 
i think plesk will re-write the file each time something is updated in the cp...

you should look out for .htaccess, i believe you can set the ErrorDocs thing in there... and another trick might be to use the 401 error but use custom thing to redirect it to index page...
 
On a per Domain basis, you can specify ErrorDocuments directive in vhost.conf, vhost_ssl.conf, .htaccess

http://httpd.apache.org/docs/2.0/mod/core.html#errordocument

then it won't matter what the global server conf file has. There is an exception though:
there are certain circumstances where the internal messages are used regardless of the setting of ErrorDocument. In particular, if a malformed request is detected, normal request processing will be immediately halted and the internal error message returned. This is necessary to guard against security problems caused by bad requests.
 
Back
Top