source: main/trunk/greenstone3/README-CERTBOT.txt

Last change on this file was 37257, checked in by davidb, 15 months ago

Initial draft of notes on what to do when standing up an Apache2 web-proxy server over https

File size: 2.0 KB
Line 
1
2# Setting up a Greenstone3 installation to operate over
3 https using Apache2 httpd as a reverse-proxy web server
4
5In the instructions that follow, it is assumed that the
6domain you are setting up is 'dl.mydomain.org'. Edit
7accordingly!
8
9
101. Edit build.properties
11
12Near the top of the file, uncomment and set the following:
13
14 revproxy.protocol=https
15 revproxy.domain=dl.mydomain.org
16 revproxy.context=/greenstone3
17
182. Test web server visibility (http at this stage)
19
20
21To issue a certificate, 'certbot' needs to be able to connect to your
22public facing web server over http.
23
24
252.1 Create a very basic Apache config file
26
27As route create the file:
28
29 /etc/apache2/sites-enabled/mydomain.conf
30
31With the content:
32
33 <VirtualHost *:80>
34 ServerName dl.mydomain.org
35
36 ServerAdmin [email protected]
37
38 DocumentRoot /var/www/html
39
40 ErrorLog ${APACHE_LOG_DIR}/error.log
41 CustomLog ${APACHE_LOG_DIR}/access.log combined
42 </VirtualHost>
43
44
452.2 Restart your apache2 httpd server
46
47 sudo systemctl restart apache2
48
492.3 Check your web server is visible
50
51Ideally using a machine external to where you are setting up
52your DL web server, in a web browser visit:
53
54 http://dl.mydomain.org/
55
56Or else at the command line enter:
57
58 wget -O - http://dl.mydomiain.org
59
60If this results in a 404 error, it might be that you haven't waited
61long enough for the IP number you have registered with your domain
62name to be pushed out to publicly accessible DNS servers.
63As a more basic test, see if you can 'ping' your domain name:
64
65 ping dl.mydomiain.org
66
67
683. Use CertBot to setup your web server for https access
69
70 sudo certbot --apache
71
72and answer the prompts generated.
73
74In the event you are adding a new domain to an existing Apache2 web
75server, then the command would be:
76
77 sudo certbot --apache --expand -d dl.mydomain.org
78
794.
80
81 ProxyPass /greenstone3 http://localhost:6363/greenstone3
82 ProxyPassReverse /greenstone3 http://localhost:6363/greenstone3
83
84sudo /sbin/a2enmod headers
Note: See TracBrowser for help on using the repository browser.