• Dear Pleskians! The Plesk Forum will be undergoing scheduled maintenance on Monday, 7th of July, at 9:00 AM UTC. The expected maintenance window is 2 hours.
    Thank you in advance for your patience and understanding on the matter.

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