Help - Search - Members - Calendar
Full Version: Error Pages in Plesk
The Planet Forums > Control Panels > Plesk
beggers
On Plesk, I see that there are some default error pages in error_docs, however, they don't seem to be active. How do I get the system to use these?

Thanks!
LadyHawk
Log in and press the HOSTING button for a domain you have set up and check the Apache ErrorDocs check box.

You can put up custom error pages by naming them the exact name in the error_docs folder and reuploading them. Make sure you put the right name with the right error page.
beggers
Thahks, that did the trick!
LadyHawk
You are very welcome !
-SH-
Unfortunately I used the new "edit" feature in the Plesk 6 file manager, and it apparantly changed the permissions of my error docs so now they do not display at all. =(

Can anyone tell a newb what the permissions need to be on ym error docs?

Thank You !
LadyHawk
The error_docs is 755 and the error pages are 750.
-SH-
Hmm, oh boy. Well it looks like it's not going to be as simple as changing permissions because that's what I've got set.

All I did was log into Plesk 6, open the file manager, go to the error_docs directory, click the "edit" icon for each html file, (bad_request.html, forbidden.htm, internal_server_error.html, and not_found.html) edited out the line that said Apache server at , then clicked the "save & exit" button. Now all of my error pages give the proper error but also say:

Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request.

That is why I thought this was a permissions issue, obviously I have upset Plesk. Any advice on how I can fix this?
LadyHawk
Make sure it is owned by root and not by the domain user.
-SH-
Thanks for your help LadyHawk, these are the default error_docs on the server, no additional accounts have been set up yet. It says the owner is root... But what does that mean as far as what I need to do now?
icon_sad.gif
Long day, very frustarted, I really appreciate your help.
LadyHawk
If you are talking about: /home/httpd/vhosts/.skel/0

(directory)
drwxr-xr-x 2 root root error_docs

(files)
-rw-r--r-- 1 root root bad_request.html
-rw-r--r-- 1 root root forbidden.html
-rw-r--r-- 1 root root internal_server_error.html
-rw-r--r-- 1 root root not_found.html
-SH-
These error docs were in the primary domain name error_docs folder, I did not edit the skel files. They are in /home/httpd/vhosts//error_docs
-SH-
Is there some way in Plesk6 to restore the edited error pages through the skeleton files? They should be correct since I did not change them.
-SH-
Thanks for your time LadyHawk, anyone else care to take a shot?
I feel like an idiot but really could use some help.
icon_biggrin.gif
usa.biz
you have to change owner to domainuser.psacln and change mod to 644 e.g

chown domainuser.psacln not_found.html
chmod 644 not_found.html
beggers
It's ironic that I originally started this thread with an older version of Plesk, and now I can't it work in in Plesk 7, either.

Creating a new domain with "custom error documents" doesn't seem to enable the error documents. And I can tell you with absolute certainty that I never had to do through the 40+ domains on my old server changing permissions just to get all the files working (as suggested in the previous posts here).

There seems to be a permissions mismatch right out of the box.

What I normally do with all my domains is edit the not_found.html document and insert a refresh to the home page of the site. That way whe people find old, non-existent topics and stuff in the search engines they'll at least get to my home page instead of just getting an error message.

Anyway, I can't get it to work. Please help!
micxz
How I got this all to work is during your setup under Server > Skeleton. On the top you see:
Upload skeleton archive file (*.tgz, *.zip):

1. Create a folder structure you want for all clients. I just copied what plesk had there and implemented my hosting design and error messages taking advantage of "@domain_name@" were I could'

e.g.
error_docs
httpdocs
httpsdocs

2. Create your error documents
the plesk example:
CODE
<HTML>

<HEAD>

<TITLE>404 Not Found</TITLE>

</HEAD>

<BODY>

<H1>Not Found</H1>

The requested document was not found on this server.

<P>

<HR>

<ADDRESS>

Web Server at @domain_name@

</ADDRESS>

</BODY>

</HTML>



<!--

  - Unfortunately, Microsoft has added a clever new

  - "feature" to Internet Explorer. If the text of

  - an error's message is "too small", specifically

  - less than 512 bytes, Internet Explorer returns

  - its own error message. You can turn that off,

  - but it's pretty tricky to find switch called

  - "smart error messages". That means, of course,

  - that short error messages are censored by default.

  - IIS always returns error messages that are long

  - enough to make Internet Explorer happy. The

  - workaround is pretty simple: pad the error

  - message with a big comment like this to push it

  - over the five hundred and twelve bytes minimum.

  - Of course, that's exactly what you're reading

  - right now.

  -->

3. and tar ball em and gzip em'
from within the directory were the main folders are stored:
CODE
tar -cvzf myskel.tgz .


4. Upload myskel.tgz via plesk CP and your off

Now newly created domains will have this structure.

Works great here on Plesk 7
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.