Husprey is built with collaboration in mind. It works better when served under a url.

Once Husprey is running on your instance:

  • Make sure a DNS entry points towards the machine

  • Set up a local proxy to serve Husprey

Here you'll find 2 examples to serve Husprey with Nginx and Apache2.

Those examples expect your machine to be accessible on the port 80 with Husprey running on port 8020.
Finally, Husprey will be accessible under the subfolder /husprey (ex: https://internal.mycompany.com/husprey)

⚠️ Both configurations also expect an already working redirection from the secured port (443) to the non-secured port (80). Contact us to get more info about certificates and secured entry points.

Nginx

Add a new server to Nginx's one of the sites-enabled files (/etc/nginx/sites-enabled/). Don't forget to edit the files with sudo access.

server {
listen 80 default_server;
list [::]:80 default_server;

server_name _; # YOU CAN ALSO REPLACE THIS WITH YOUR DOMAIN HERE

location /husprey / {
proxy_pass http://localhost:8020/;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header Host $host;
}
}

Once done, don't forget to reload

sudo systemctl reload nginx

Apache 2

Be careful to activate proxy, proxy-http and headers modules

Add a new VirtualHost to Apache's sites-enabled files (/etc/apache2/sites-enabled/). Don't forget to edit the files with sudo access.

<VirtualHost *:80> 
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
#ServerName yourdomain.com # YOU CAN REPLACE THIS LINE WITH YOUR DOMAIN HERE
ProxyPreserveHost On
ProxyPass /husprey/ http://0.0.0.0:8020/
ProxyPassReverse /husprey/ http://0.0.0.0:8020/
</VirtualHost>

Once done, don't forget to reload

sudo systemctl restart apache2

Please reach out to help@husprey.com if you experience issues along the way.

Did this answer your question?