Ssl – Possible to close port 80 and still use port 443

apache-2.2httpsssl

I have a web application that should only be accessible through HTTPS.

  • Is it possible, and a wise idea to close port 80 entirely?
  • Are there any drawbacks to closing port 80, beyond the fact browsers can't hit it in a non-encrypted way?

Search engine visibility is not a priority.

Best Answer

You can specify that apache only listen on a particular port, for all sites, or just a VirtualHost. See the Listen directive.

If you have a name or ip virtual host for that site, just configure it to only use port 443. It is also good idea to redirect all requests for your site on port 80 to 443. There are a few examples on Wikipedia on how to implement this using HTTP Strict Transport Security, with a vhost example for Apache.