[Koha] Redirect HTTP intranet to HTTPS

Chris Cormack chrisc at catalyst.net.nz
Wed Jan 27 09:02:39 NZDT 2016


* Coehoorn, Joel (jcoehoorn at york.edu) wrote:
> We have our intranet staff client set to use port 8443. I have turned off
> port 8080. We want to require connections to the staff client use HTTPS.
> 
> How can get koha or apache to redirect HTTP connections on port 8443 to the
> equivalent HTTPS url?
> 
Hi Joel

You don't do it in Koha, but you can do it in Apache.

Easiest way is to have 2 virtual hosts, one listening on whatever port, and the other
set up to do HTTPS

In the first one, you simply redirect to the https one

https://httpd.apache.org/docs/2.4/mod/mod_alias.html#redirect

For example in your case it would be something like

<VirtualHost *:8443>
    ServerName www.example.com
    Redirect "/" "https://www.example.com/"
</VirtualHost >

<VirtualHost *:443>
    ServerName www.example.com
    # ... SSL configuration goes here
</VirtualHost >

Hope this helps

Chris

-- 
Chris Cormack
Catalyst IT Ltd.
+64 4 803 2238
PO Box 11-053, Manners St, Wellington 6142, New Zealand
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <https://lists.katipo.co.nz/pipermail/koha/attachments/20160127/c3ecf2d4/attachment.sig>


More information about the Koha mailing list