404 page problem

simba

Verified User
Joined
Oct 13, 2012
Messages
54
Hello all.

I ask somebody's help / suggestions.

I have disabled SSL for users, but when you still type https://user.com request is redirected to the /var/www/html
and they end up seeing index.html of /var/www/html

How could i make that proper 404 would be returned?

Another case, if i go to my server directly let's say 123.123.12.123/notexistent i would expect to see proper 400 page, but i get:
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

I see all error files in the /var/www/error but they are not being used?

Thank you for help!
 
I have disabled SSL for users, but when you still type https://user.com request is redirected to the /var/www/html
and they end up seeing index.html of /var/www/html

How could i make that proper 404 would be returned?
You need to have indexes turned off for that directory in .htaccess file.

Jeff
 
They have:

Options -Indexes

I would expect server return default error page if user does not override with custom error pages.

Also returning index.html file (200) for non existent subdomains does not make sense.
 
Sorry, I read your post too quickly and gave an incorrect response. If you call via SSL and the site doesn't have it turned on, iyou're seeing the default page for the IP#. I'm not sure why but perhaps someone else can respond with a configuration which would fix that.

Jeff
 
I would expect server return default error page if user does not override with custom error pages.

So you might need to create them and put them into /var/www/html
As if the site has no SSL enabled, every request for such a site will be handled by default virtual hosts document root of which is set to /var/www/html (it's true if your site is located on server IP, but not shared one or dedicated one).
 
OK, and what error log says? I'd guess you should see two lines there if you request a missing file: the first referring to file requested by you and the second one referring to the missing 404 error file.
 
Back
Top