• Howdy! Welcome to our community of more than 130.000 members devoted to web hosting. This is a great place to get special offers from web hosts and post your own requests or ads. To start posting sign up here. Cheers! /Peo, FreeWebSpace.net
managed wordpress hosting

Custom error page issue. Need help...

eSupun

New Member
Dear fellow members of FWS,

I have some issue for putting error pages in my cPanel server. Maybe I have gone all the way wrong. If so, please point me.

Today, I designed a error page to handle error documents appear on my web server. I don't allow custom error pages to my users. So I thought to create a good design and put it on every error page in all the websites I host. But I thought it's so hard to create each error document with different HTML pages. So I created a PHP file and posted the error code via GET method to that PHP file. And edited the "errordocument.conf" in the Apache directory(.../apache/conf/includes) like following.

Code:
ErrorDocument 424 /error.php?424

I have disabled the "Custom Error Pages" feature on feature manager.

I have this custom error page PHP file in that directory.(Apache includes dir) Then restarted the server. But I see the regular Error document even now.

My concern is, why this is happening? Please give me a rough idea what is the reason for this. If I've missed some information you need to know, please ask in this thread.

Thank you and I really appreciate your comments.

Regards.

P.S. Maybe I've stated all the things mixed. Sorry about that. :( I am totally confused because of this.
 
you need to add an alias to the directory with error.php in it to the config too. If you don't, it will use error.php on the current vhost.
Example:
Code:
alias /perfectzcustom /var/www/html/perfectzcustom
errordocument 404 /perfectzcustom/404.html
Also, disabling the custom error pages feature in cPanel will not prevent someone from adding it to .htaccess manually.
 
Last edited:
you need to add an alias to the directory with error.php in it to the config too. If you don't, it will use error.php on the current vhost.
Example:
Code:
alias /perfectzcustom /var/www/html/perfectzcustom
errordocument 404 /perfectzcustom/404.html
Also, disabling the custom error pages feature in cPanel will not prevent someone from adding it to .htaccess manually.

You mean to add those in the httpd.conf? And I have to add them again?
 
You would add it to the cPanel include files and add 404.html (and related error pages) to /var/www/html/perfectzcustom
 
Last edited:
The problem is that "?" is a special character in Apache/Linux .. you need to comment it out. Basically, a question mark indicates the character before it is "optional".

Code:
ErrorDocument 424 /error.php\?424
 
Last edited:
The problem is that "?" is a special character in Apache/Linux .. you need to comment it out. Basically, a question mark indicates the character before it is "optional".

Code:
ErrorDocument 424 /error.php\?424

Thanks. Will try it too.
 
If I were you I would hire someone for this job. It seems you have spend a lot of time already on this.

I did the same as you thought. :) I pointed the issue to ExaBytes support. They are looking into the issue now.

As they've said, the issue is with the suPHP.

Probably they'll contact me with an update within next few minutes.
 
try to recompile the apache with the easyapache to use cgi-php

I tried it already. But when I do so, server gives me 500 Misconfiguration error.

ExaBytes engineers told me that the issue is occuring because of my PHP page. Because the min UID does not match to the script I created. So I am going to create HTML pages for all of them.

What to do? :(
 
Back
Top