0

I want to create a default blank page VirtualHost for my server so that anyone who attempts to browse directly to the IP address (e.g. https://10.123.123.123/) is shown a blank page.

I've done this for HTTP connections easily enough using a _default_:80 VirtualHost like this:

<VirtualHost _default_:80>
    ServerName nothing
    DocumentRoot /var/www/html/blank
    ErrorLog logs/blank-error_log
    CustomLog logs/blank-access_log common
</VirtualHost>

However, if I try the above for HTTPS (replacing "80" with "443"), I get "connection interrupted" errors from browsers even for the legitimate VirtualHosts running on port 443 of the same server.

Is there a way I can create a blank/default host for HTTPS on port 443?

HBruijn
  • 77,029
  • 24
  • 135
  • 201
WackGet
  • 217
  • 4
  • 12
  • you need server certificates for SSL. certificates need a matching hostname or, in your case, the ip address as the name. – Gerald Schneider Apr 24 '17 at 06:15
  • If you only replace the port number, and as @GeraldSchneider says, don't include an actual TLS certificate, you can can only connect over plain http to port 443, hence the *"connection interrupted"* error. Most likely plain **`http`** `://:443` does work – HBruijn Apr 24 '17 at 07:36

0 Answers0