Koozali.org: home of the SME Server

web page error

Offline BlueLake

  • ***
  • 56
  • +0/-0
web page error
« on: July 02, 2014, 03:23:54 PM »
Hi
Looking through the forums I found an example of using a customized web error page using an ibay for my website...created the 11ErrorDocs as described...added this line... ErrorDocument 404 /home/e-smith/files/ibays/(website)/html/erro_404.php

expanded the template as stated and then tested for errors
which returned the standard error page plus
...Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request. So this (to me anyway) would suggest I have made the 11ErrorDocs file and expanded the template correctly but possibly have the wrong path to the ibay error page, I have tried several different paths without luck. Anybody have any suggestions...   

Offline Stefano

  • *
  • 10,894
  • +3/-0
Re: web page error
« Reply #1 on: July 02, 2014, 03:26:05 PM »
please post here the link with the example, thank you

Offline BlueLake

  • ***
  • 56
  • +0/-0
Re: web page error
« Reply #2 on: July 02, 2014, 03:40:58 PM »

Offline Stefano

  • *
  • 10,894
  • +3/-0
Re: web page error
« Reply #3 on: July 02, 2014, 04:20:41 PM »

Offline BlueLake

  • ***
  • 56
  • +0/-0
Re: web page error
« Reply #4 on: July 02, 2014, 04:35:30 PM »
Hi Stefano

How is this example any different to the one I followed apart from the name of the error file...!

As far as I can work out the example I followed works (I think)...the problem I believe would be in the path to the ibay where my error pages are, or am I missing something?

according to Charlie Brady...
1) Change to custom template directory

> cd /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf

2) Make template

> pico 11ErrorDocs

Contents of 11ErrorDocs:
------------------------------------------
ErrorDocument 500 /error.php
ErrorDocument 404 /error.php
ErrorDocument 401 /error.php
ErrorDocument 403 /error.php
ErrorDocument 402 /error.php
------------------------------------------

error.php is located in my primary/html folder.  Check permissions and owner.

3) Expand templates

> /sbin/e-smith/expand-template /etc/httpd/conf/httpd.conf

4) Restart apache

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

instead of ErrorDocument 404 /error.php
I have ErrorDocument 404 /home/e-smith/files/ibays/(website name)/html/error_404.php

which is the path to the error page, but I am still getting the standard Not Found page...

Offline Daniel B.

  • *
  • 1,700
  • +0/-0
    • Firewall Services, la sécurité des réseaux
Re: web page error
« Reply #5 on: July 02, 2014, 04:50:39 PM »
instead of ErrorDocument 404 /error.php
I have ErrorDocument 404 /home/e-smith/files/ibays/(website name)/html/error_404.php

which is the path to the error page, but I am still getting the standard Not Found page...

You need to set an URL, not the full path of your file on the server. So either /error_404.php or http://sme.youdomain.tld/error_404.php

Also, you are using PHP files, have you enabled dynamic content execution ? (I personnaly do not recommand seting dynamic content on the Primary ibay for security concerns, but, php files won't be served if you don't enable it)
C'est la fin du monde !!! :lol:

Offline BlueLake

  • ***
  • 56
  • +0/-0
Re: web page error
« Reply #6 on: July 02, 2014, 05:06:49 PM »
Hi Stefano
Yep, that works...using (as per the example) /error_404.php and NOT the full path to the error page as I was using...Thanks.