Re: converting my local site to be https only access
On Fri, Apr 28, 2017 at 11:35:06PM -0400, Gene Heskett wrote:
> Greetings all;
> My web site (see the sig) is local, on this machine, in a pretty tight
> sandbox, but not running https.
> Where can I find a tut that is a complete instruction set to have it do
> an auto-redirect to itself, but using the "s" stuff regardless of the
> accessing client as long as the client can handle the https stuff this
> conversion will return to the client?
Inferring that you are using apache2, a few notes from my observations of
the thread as it currently stands.
one of the instruction sets you were following was suggesting to use
mod_rewrite. Personally, I think that's overkill. Achieving what you
want is possible using a simple Redirect, which is provided by
mod_rewrite, which is very likely already enabled (but if not, you can
enable it in the same way, via symlink, which you can create via a2enmod,
or by hand).
We don't know how you have your site set up already, in particular whether
or not you are using VirtualHosts. My advice would be to do so if you are
not, so a "pre-step" would be migrating to them.
Once using VirtualHosts, you can configure one to bind to port 80, and
another to 443. From memory, it would look something like this
RedirectMatch permanent ^(.*)$ https://<YOUR SITE ADDRESS>$1
# configuration for your website (now) lives here
Substituting <YOUR SITE ADDRESS> appropriately.
This is all from memory as I haven't used apache2 myself for many years (and
looking back, having since used things like lighttpd and more recently nginx,
the configuration language is much worse; stockholm syndrome whilst I was a
⣾⠁⢠⠒⠀⣿⡁ Jonathan Dowland
⠈⠳⣄⠀⠀⠀⠀ Please do not CC me, I am subscribed to the list.