• Halloween is coming! To celebrate the occasion, we dusted off a couple of old skins, and even created a brand new one (Pixel).
    To get into the festive spirit, install the Skins extension.
  • The new Python extension is now available. It allows customers to deploy and manage WSGI-based Python applications on their websites directly from Plesk.
  • The Plesk Mobile apps for iOS and Android and the Plesk Mobile Center extension have been deprecated, and are no longer available for new installations. In Plesk Obsidian 18.0.84, the Plesk Mobile Center extension will be removed from servers during the upgrade, and the Plesk Mobile apps will lose their server management features.
  • The Social Login extension has been deprecated and will be removed in Plesk Obsidian 18.0.84. After that, it will no longer be possible to log in to Plesk with a Google, Facebook, GitHub account, or with a passkey. Plesk usernames and passwords, as well as logging in with a WebPros Account, are not affected.

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