Apache

From UVOO Tech Wiki
Revision as of 23:47, 6 February 2019 by imported>Jeremy-busk
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Reverse Proxy on Ubuntu Bionic Using Apache

Something like the below

Ubuntu Bionic

sudo a2enmod proxy
sudo a2enmod proxy_http
sudo a2enmod proxy_balancer
sudo a2enmod lbmethod_byrequests
sudo systemctl restart apache2

nano /etc/apache2/sites-available/default-ssl.conf

    ProxyPass /docs/ http://repo.example.io/numifex/35d6925e-1dc3-11e9-b575-672a33f93a5a/docs/
    ProxyPassReverse /docs/ http://repo.example.io/numifex/35d6925e-1dc3-11e9-b575-672a33f93a5a/docs/

Test config and then restart if passes

apachectl configtest
sudo systemctl restart apache2

Since Apache is handling https let's redirect all http to https.

Simplest add between VirtualHost: nano /etc/apache2/sites-available/000-default.conf

Redirect / https://numifex.io

Resources