-
-
Notifications
You must be signed in to change notification settings - Fork 18
Reverse Proxy Setup
Florian Quirin edited this page Jan 10, 2020
·
15 revisions
-- UNDER CONSTRUCTION --
A reverse proxy is lightweight server that acts as a central contact point for clients and distributes connection requests to any number of associated servers that are usually not accessible by a client. In addition it usually offers security features like rate-limiting or handling of SSL certificates.
SEPIA for example requires a reverse proxy if you want to access it safely from a public domain (e.g. example.com/sepia).
Create a new file at /etc/apache2/sites-available/sepia.conf and add the following content:
Define LOCATION sepia/assist/app
Define LOCATION sepia
Define HOST localhost
ProxyPass /${LOCATION}/assist/ http://${HOST}:20721/
ProxyPass /${LOCATION}/teach/ http://${HOST}:20722/
<Location /${LOCATION}/chat/>
ProxyPass http://${HOST}:20723/
RewriteEngine On
RewriteCond %{HTTP:UPGRADE} ^WebSocket$ [NC]
RewriteCond %{HTTP:CONNECTION} Upgrade$ [NC]
RewriteRule /messages/(.*) ws://${HOST}:20723/messages/$1 [P]
</Location>
Then load the new settings and restart your Apache web-server:
sudo a2ensite sepia.conf
sudo systemctl reload apache2