Bugzilla – Attachment 45399 Details for
Bug 15303
Letsencrypt option for Debian package installations
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 15303 --force-https option for koha-create
Bug-15303---force-https-option-for-koha-create.patch (text/plain), 2.26 KB, created by
Mirko Tietgen
on 2015-12-04 00:35:49 UTC
(
hide
)
Description:
Bug 15303 --force-https option for koha-create
Filename:
MIME Type:
Creator:
Mirko Tietgen
Created:
2015-12-04 00:35:49 UTC
Size:
2.26 KB
patch
obsolete
>From 1e120ad6ee2aded137b56338e04a70b537032453 Mon Sep 17 00:00:00 2001 >From: Mirko Tietgen <mirko@abunchofthings.net> >Date: Fri, 4 Dec 2015 01:32:26 +0100 >Subject: [PATCH] Bug 15303 --force-https option for koha-create > >koha-create --force-https >- generates letsencrypt certificates >- sets up a https-only website >- redirects 80 to https (not yet) >--- > debian/scripts/koha-create | 16 ++++++++++++++++ > 1 file changed, 16 insertions(+) > >diff --git a/debian/scripts/koha-create b/debian/scripts/koha-create >index a36f7e3..d51eea8 100755 >--- a/debian/scripts/koha-create >+++ b/debian/scripts/koha-create >@@ -71,6 +71,7 @@ Options: > conjunction with --defaultsql and --populate-db. > --upload-path dir Set a user defined upload_path. It defaults to > /var/lib/koha/<instance>/uploads >+ --force-https Set up a https-only site with letsencrypt certificates > --help,-h Show this help. > > Note: the instance name cannot be longer that 11 chars. >@@ -419,6 +420,8 @@ while true ; do > SRU_SERVER_PORT="$2" ; shift 2 ;; > --upload-path) > CLO_UPLOAD_PATH="$2" ; shift 2 ;; >+ --force-https) >+ USE_HTTPS="yes" ; shift ;; > -h|--help) > usage ; exit 0 ;; > --) >@@ -708,6 +711,19 @@ then > # Start Indexer daemon > koha-indexer --start "$name" > fi >+ >+ if [ "$USE_HTTPS" = "yes" ]; then >+ # Get letsencrypt certificates >+ # TODO: fix path of letsencrypt >+ /path/to/letsencrypt-auto --agree-tos --renew-by-default --webroot --server https://acme-v01.api.letsencrypt.org/directory certonly -w /usr/share/koha/opac/htdocs/ -d $opacdomain -w /usr/share/koha/intranet/htdocs/ -d $intradomain >+ # enable all ssl settings (apache won't start with these before certs are present) >+ sed -i "s:^\s*#\(\s*SSL.*\)$:\1:" "/etc/apache2/sites-available/$name.conf" >+ # change port from 80 to 443. (apache won't start if it is 443 without certs present) >+ sed -i "s:^\s*\(<VirtualHost \*\:\)80> #ssl$:\1443>:" "/etc/apache2/sites-available/$name.conf" >+ # TODO: enable forward from 80 to https >+ # restart apache with working certs >+ service apache2 restart >+ fi > fi > > >-- >1.7.10.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 15303
:
45397
|
45399
|
45400
|
45402
|
45404
|
45408
|
45409
|
45414
|
45415
|
46116
|
46117
|
46118
|
46617
|
46742
|
46745
|
46746
|
46747
|
46748
|
46749
|
46750
|
46751
|
46752
|
49470
|
49471
|
50215
|
50216
|
50271
|
50283
|
50287
|
50307
|
50308
|
50309
|
50310
|
50311
|
50312
|
50313
|
50324