1,575
edits
Changes
→Setup the Reverse Proxy
#If you want to put an ''htpasswd'' based password on the front of the site then create an htpasswd file by running <pre>sudo htpasswd -c /etc/apache2/.webtrees_htpasswd username</pre>
#Add a redirect (from HTTP to HTTPS) to Apache by running <pre>sudo nano /etc/apache2/sites-enabled/000-default.conf</pre> and adding the following under the '''<VirtualHost *:80>''' tag <pre>Redirect permanent /webtrees https://steamforge.net/webtrees</pre>
#Add the Proxy calls to Apache by running the following <pre>sudo nano /etc/apache2/sites-enabled/000-default-ssl.conf</pre> and adding the following under the '''<VirtualHost _default_:443> ''' tag <pre>#webtrees <Location /webtrees> AuthType Basic AuthName "Enter username/password to access webtrees" AuthBasicProvider file AuthUserFile "/etc/apache2/.webtrees_htpasswd" Require valid-user ProxyPreserveHost On ProxyPass http://containername/webtrees ProxyPassReverse http://containername/webtrees </Location></pre> (leave off the first block about Authentication if you didn't create ''.webtrees_htpasswd'')
[[Category: Linux]]