I've an apache server on linux machine which listen at: http://:8080 it'll redirect to https://:8082

my real question is how could we obtain the friendly error page whenever we access: http://:8082 //wrong port

till now we'll possess the info in internet browser status bar: "awaiting http://:8082...", with no response in very long time.

you realize, the main harbour 8082 is special since it is employed for https connection, when we access: http://:8083, it'll return with error(HTTP 400 Bad Request) rapidly.

thanks, Emre

This should propably maintain serverfault but here is a reply anyway.

Multiple methods to archive what you're after, not one of them that is particulary great. But when i'd really need to do this i'd get it done such as this

  1. your site ought to be running with linux &lifier you ought to have root access
  2. setup an online host in apache on arbituary port that will only reply with this error message about wrong port.
  3. setup iptables rules to forward all connection on ports x,y,z that are "wrong" ports towards the port in which the virtualhost you set up is running.