#1  
Old 24th November 2009, 09:18
Niels Niels is offline
Member
 
Join Date: Oct 2009
Posts: 52
Thanks: 5
Thanked 2 Times in 2 Posts
Default Error documents

I get this

Not Found
The requested URL /sdfsdfsdf was not found on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.


--------------------------------------------------------------------------------

Apache/2.2.12 (Ubuntu) Server at www.gnyftest.com Port 80


But there are a 404.html in the error folder of the website. But why will it not be shown?
Reply With Quote
Sponsored Links
  #2  
Old 24th November 2009, 09:42
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 35,486
Thanks: 813
Thanked 5,256 Times in 4,121 Posts
Default

Please enable the own error documents checkbox in the site settings.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #3  
Old 24th November 2009, 09:51
Niels Niels is offline
Member
 
Join Date: Oct 2009
Posts: 52
Thanks: 5
Thanked 2 Times in 2 Posts
Default

Quote:
Originally Posted by till View Post
Please enable the own error documents checkbox in the site settings.
Its done as default. But dont show error documents
Reply With Quote
  #4  
Old 24th November 2009, 10:05
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 35,486
Thanks: 813
Thanked 5,256 Times in 4,121 Posts
Default

Do you use any kind of redirects in this website?
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #5  
Old 24th November 2009, 10:09
Niels Niels is offline
Member
 
Join Date: Oct 2009
Posts: 52
Thanks: 5
Thanked 2 Times in 2 Posts
Default

Quote:
Originally Posted by till View Post
Do you use any kind of redirects in this website?
I have been adding some code but here are the apache2 file

Code:
<Directory /var/www/gnyftest.com>
    AllowOverride None
    Order Deny,Allow
    Deny from all
</Directory>

<VirtualHost *:80>
      DocumentRoot /var/www/gnyftest.com/web

    ServerName gnyftest.com
    ServerAlias *.gnyftest.com
    ServerAdmin webmaster@gnyftest.com

    ErrorLog /var/log/ispconfig/httpd/gnyftest.com/error.log

    ErrorDocument 400 /error/400.html
    ErrorDocument 401 /error/401.html
    ErrorDocument 403 /error/403.html
    ErrorDocument 404 /error/404.html
    ErrorDocument 405 /error/405.html
    ErrorDocument 500 /error/500.html
    ErrorDocument 503 /error/503.html

    <Directory /var/www/gnyftest.com/web>
        Options FollowSymLinks
        AllowOverride All
        Order allow,deny
        Allow from all
    </Directory>
    <Directory /var/www/clients/client6/web15/web>
        Options FollowSymLinks
        AllowOverride All
        Order allow,deny
        Allow from all
    </Directory>

    # php as fast-cgi enabled
    <Directory /var/www/gnyftest.com/web>
        AddHandler fcgid-script .php .php3 .php4 .php5
        FCGIWrapper /var/www/php-fcgi-scripts/web15/.php-fcgi-starter .php
        Options +ExecCGI
        AllowOverride all
        Order allow,deny
        Allow from all
    </Directory>

#
#new code start
<IfModule mod_rewrite.c>
        RewriteEngine on

        RewriteCond %{http_host} ^gnyftest\.com [nc]
        RewriteRule ^(.*)$ http://www.gnyftest.com$1 [r=301,nc]

        RewriteCond %{HTTP_HOST} ^www\.([^.]+)\.gnyftest\.com [nc]
        RewriteRule ^(.*)$ http://%1.gnyftest.com$1 [r=301,nc]


        RewriteCond %{REQUEST_URI} !^/sd_
        RewriteCond %{HTTP_HOST} !^www\.gnyftest\.com [NC]
        RewriteCond %{HTTP_HOST} ^([^.]+)\.gnyftest\.com
        RewriteRule (.*) /sd_%1/$1 [L]

              RewriteCond %{HTTP_HOST}   ^gnyftest\.com [NC]
        RewriteRule   ^/(.*)$ $1
          </IfModule>
#new code end




</VirtualHost>
Reply With Quote
  #6  
Old 1st December 2009, 02:00
Norm Norm is offline
Junior Member
 
Join Date: Nov 2009
Posts: 2
Thanks: 0
Thanked 1 Time in 1 Post
Default Getting own error documents.

This is what I had to do on my Ubuntu 9.10 server to get the 'own' error documents to show.

Edit the file

/etc/apache2/conf.d/localized-error-pages

Scroll down to the section

# The internationalized error documents require mod_alias, mod_include
# and mod_negotiation. To activate them, uncomment the following 30 lines.

<IfModule mod_negotiation.c>
<IfModule mod_include.c>
<IfModule mod_alias.c>

Alias /error/ "/usr/share/apache2/error/"



Then change the Alias line to something like...

Alias /errors/ "/usr/share/apache2/error/"

So that the alias is something other than /error/

Save the edit then reload Apache

/etc/init.d/apache2 reload

Then if you have selected 'own' documents in the create site section of the ISPConfig you should get the error documents read in from /web/error/

If you untick this 'own' document box and save (then wait a minute or so) you will get the normal apache errors.

Maybe someone will come up with a way to retain the localized language pages because my kludge will probably break that bit. But it works for me. I make everybody read English.

Norm
Reply With Quote
The Following User Says Thank You to Norm For This Useful Post:
salami (17th December 2009)
  #7  
Old 1st December 2009, 13:07
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 35,486
Thanks: 813
Thanked 5,256 Times in 4,121 Posts
 
Default

If you dont use redirects, the error documents will work. But the problem with redirects is that apache expects the error documents in a relative fo,der to the redirect target. So you might have to create a symlink "error" then from your redirect target dir to the error directory of the website.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 05:06.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.