• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • We are looking for U.S.-based freelancer or agency working with SEO or WordPress for a quick 30-min interviews to gather feedback on XOVI, a successful German SEO tool we’re looking to launch in the U.S.
    If you qualify and participate, you’ll receive a $30 Amazon gift card as a thank-you. Please apply here. Thanks for helping shape a better SEO product for agencies!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

Absolute paths in web.config suddenly cause errors...?

C

ClaudiusT

Guest
Hello,

I have the following problem:


If I try to access any folder behind a .htaccess password protection I get the "internal server error" message.

Since my webstat files are behind such a protection I recognized that the error appeared from one day to the next.
I did not update my Plesk in between so I really have no clue how this happened.
I'm using Plesk since nearly a year now and never experienced a problem browsing my Webstats or accessing any other protected content.

As I tried to browse protected content directly through Remote Desktop on my server itself I got the real error message instead of the general "internal error" message which was:
________
Absolute physical path c:\inetpub\vhosts\**domain.tld**\error_docs\unauthorized.html is not allowed in system.webServer/httpErrors section in web.config file. Use relative path instead.
________

So I changed the absolute paths of the nine listed errors in my web.config file.
Example:
From "c:\inetpub\vhosts\**domain.tld**\error_docs\unauthorized.html"
into "..\error_docs\unauthorized.html"


And... - it worked! I can browse all the protected sites again like it should be.

BUT: I have nearly a hundred domains on my server and I don't want to download all the single web.config files and change the data in all of them. For one thign that would be a time-taking procedure but mainly I'm wondering how this error appeared so suddenly and how I can fix it again...



I would be really thankful for any help!

And please excuse my bad english,


regards,
ct
 
Same problem here. The problem appeared after migrating from Plesk 7.6 on Windows 2003 to Plesk 8.6 on Windows 2008.

Did you find a solution?

Unchecking the 'Custom Error Documents' box under 'Setup' in the Plesk control panel fixes the problem.

1) How to do this for many domains?
It may be possible to switch off 'Custom Error Documents' via a plesk command-line program e.g. domains.exe.
In the past, when it has been necessary to run a command-line program for every domain, I have used an SQL query to construct it from the Plesk database.

2) How to have custom errors working in Plesk 8.6 on Windows 2008? Maybe it just doesn't work?

> And please excuse my bad english
?? Your english is better than many English people's.

Thanks,
Julian
 
Thank you for your help.

If I try to deactivate the "Custom error Documents" box in the domain setup I recieve the following error:

Unable to reconfigure Web server: websrvmng failed: Dateiname: \\?\c:\inetpub\vhosts\***DOMAIN.TLD***\httpdocs\test\web.config
Fehler: Die Konfigurationsdatei kann nicht gelesen werden
In module
Exception type: System.IO.DirectoryNotFoundException
bei Microsoft.Web.Administration.Interop.AppHostWritableAdminManager.GetAdminSection(String bstrSectionName, String bstrSectionPath)
bei Microsoft.Web.Administration.Configuration.GetSectionInternal(ConfigurationSection section, String sectionPath, String locationPath)
bei Microsoft.Web.Administration.Configuration.GetSection(String sectionPath)
bei CInternalUtils.GetSection(String sSite, String sPath, String sLocation)
bei CInternalUtils.GetSection(Char* sSite, Char* sPath, Char* sLocation)
bei CIIS7SiteBase.SetToDefaultHttpErrors(CIIS7SiteBase* , Char* virtpath)
 
> 1) This can be done via domain.exe
> ...I would really not recommend doing anything directly in the Plesk database

Only 'select' statements because they are harmless.

This one produces a DOS batch file that switches off 'Custom error documents' for all domains:

select concat('domain.exe --update ', d.name, ' -err_docs false') from domains d

Start a mysql command-line prompt or phpMyAdmin session and use the psa database. Run the select statement above and save the results in a DOS batch file in the %plesk_bin% folder.

Thanks,
Julian
 
There's a Plesk command-line that implements the domain configuration that's in the Plesk database, so it can fix problems where the hosting and database get out of synch. Can't remember what it is though.
 
> 2) Yes, this works, check the following article on how to set this up:
> http://kb.odin.com/en/5279

The knowledgebase article says...

"Do not create custom files in %plesk_vhosts%\domain.name\error_docs\ directiry"

...but the upgrade from Plesk 7.6 to 8.6 leaves them exactly like that. After the upgrade, all errors are handled incorrectly if you have 'Custom Error Documents' switched on.

Surely the upgrade should move error_docs to be a sub-folder of httpdocs and re-assign the error pages accordingly.

Doing this manually via the Plesk control panel for every domain will be very time consuming. Is there a way to automate it?

Thanks,
Julian
 
Back
Top