httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael A. Peters" <mpet...@domblogger.net>
Subject Re: [users@httpd] Apache2 listening on 80(http) and 443(https)
Date Sun, 03 Apr 2016 03:20:56 GMT


On 04/01/2016 09:00 PM, Brandon L. Wisenburg wrote:
> Hi Everyone!
> I have converted my website to SSL, and I go the virtual host setup and
> SSL working in Apache. When someone uses http://domain.com they get a
> connection refused, because of course the server isn't listening on 80,
> as i have it setup for SSL (443)
>
> How would I make apache listen on http(80), but re-direct anyone that
> hits http to https.
>
> Is it possible to have apache listen on both 80 and 443?
>
> Thanks,

This is what I do -

<VirtualHost 45.79.96.192:80>
ServerName librelamp.com
Redirect permanent / https://librelamp.com/
</VirtualHost>

<VirtualHost [2600:3c01::f03c:91ff:fee4:310c]:80>
ServerName librelamp.com
Redirect permanent / https://librelamp.com/
</VirtualHost>

Seems to work very well.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message