ErrorDocument compatibility

aww

Well-Known Member
#1
I've found a (minor) errordocument compatibility problem.

Apache allows you define a simple text message for ErrorDocuments

ie.
ErrorDocument 404 "Not Found"
ErrorDocument 403 "Forbidden

I noticed litespeed complains about these in my htaccess
NOTICE [/usr/local/apache/conf/httpd.conf:1131] Unsupported ErrorDocument URL: "Forbidden, must start with '/' or 'http'.
 

mistwang

LiteSpeed Staff
#2
Yeah, that's one of the minor compatibility issue existing. Actually, LSWS can do that, just need to allow it during Apache configuration parsing phase. Will add that.

Thanks for pointing it out. :)
 

aww

Well-Known Member
#3
Slightly on the same subject, can the branding be turned off for the default error pages?

Apache let's you do this in the httpd.conf but litespeed doesn't seem to obey it.

ServerSignature Off
and
ServerTokens Min

Actually it might be obeying this now that I think about it. Apparently you can't turn off the tokens entirely.
 

mistwang

LiteSpeed Staff
#4
We may remove those signatures in the future, you need to add custom error pages for now. :)
And there is nothing ashamed of being LiteSpeed. ;)
 

aww

Well-Known Member
#5
And there is nothing ashamed of being LiteSpeed.
Not ashamed at all, infact told several people about it already.

The problem is evil hackers. Last month the normally excellent firewall we use on the server (CSF) had a vunerlability. We didn't find out about it for a few days and didn't know to upgrade. In that small time frame someone figured out we use it and was able to gain access. Had to rebuild the entire VPS for safety. Many hours wasted.

All it takes is one overlooked fault in LiteSpeed, and even if you fixed it within 24 hours, the evil hackers are constantly at play.

No server tag, more obscurity, makes it harder for them.
 

aww

Well-Known Member
#7
While my logs are fixed in 3.1.1 I just remembered to test ErrorDocument 404 "Not Found"
and it still does not work.

I get a blank page after it pauses for a few seconds.
 

aww

Well-Known Member
#8
By the way, I thought I should report that wget lsws no longer works for me unless I --limit-rate=100000

Otherwise it stalls out somewhere along the way and never recovers. Only started that recently.

And as of my newest download of 3.1.1 tonight, ErrorDocument is still not working for me, it pauses for a few seconds and then gives a blank page.
 

mistwang

LiteSpeed Staff
#9
It works for us, maybe try it in another .htaccess. "Options" override must be allowed.
Maybe something special in your .htaccess file, please send us your whole .htaccess for analysis.
 

aww

Well-Known Member
#10
Override is definitely allowed.

single line .htaccess on test account
ErrorDocument 404 "missing"
example.com/blahblahblah-notrealurl

Browser stalls for a few seconds and then comes back to a blank page.

Oh and trying to do it this way

http://ipdaddress/~username/blahblah/
gives a standard litespeed 404 error page

on apache I believe it would be the errordocument specified

This is using the 3.1.1 downloaded 7 hours ago.
 
Last edited:

aww

Well-Known Member
#12
Sorry to bring up this old topic but I found another problem regarding
errordocument and htaccess not being obeyed, still not fixed in 3.2.2

Apparently a cgi-bin underneath a document root does not obey the parent's htaccess.

ie.
example.com/cgi-bin/
will give a generic 403 error that ignores whatever is in example.com/ .htaccess (errordocument 403)

I believe apache follows the htaccess correctly however.
 
Last edited:
Top