Where to change error message Ubu 10.04, ISPConfig, Apache2

Hi,

I have ISPConfig running here using SSL, but using a different port to default. Everything is working, however I NEED to change the error message displayed when someone types http://mydomain.tld:ISPConfig_Port (instead of HTTPS:). Not looking for a redirect, legitimate users should be able to figure this out.

So my only problem is the error message contence shown below:

(I don't want my hostname (Not Subdomain) being displayed. And the suggested hint doesn't work either)

400 Bad Request (shows in browser's title bar)

Bad Request

Your browser sent a request that this server could not understand.
Reason: You're speaking plain HTTP to an SSL-enabled server port.
Instead use the HTTPS scheme to access this URL, please.

    Hint: https://hostname.mydomain.tld:ISPConfig_Port/

For the life of me, I cannot find where this error text comes from. (I'm not that good with linux or the grep command, so I'm searching the net instead.) I've found a few places where error message texts are kept;

1) /var/www/vdomain/web/error, and

2) /usr/share/apache2/error

Any help please.

1 Reply

I've gone into the /etc/apache2/conf.d/localized-error-pages file and uncommented the whole section pertaining to custom error messages. After a restart, the error message has changed to the 'alternate' default. It seems to me the error message I've pasted in my OP is the default error 400 message built into Apache when it was compiled.

So, now that I've enabled customised error messages, I can change them in the /usr/share/apache2/error/ folder for the whole server and /var/www/[v-domain]/web/error for each virtual host [v-domain]

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct