Anthias icon indicating copy to clipboard operation
Anthias copied to clipboard

Switch to HTTPS as the default port binding

Open vpetersson opened this issue 9 years ago • 2 comments

With recent Raspberry Pis being powerful, it's no longer very expensive to run Nginx as a reverse proxy. This is also a more standardized way of serving web apps, so let's do this.

Here's what we need to do:

Ansible

  • Remove enable-ssl from the SKIP_TAGS
  • Remove /bin/enable_ssh.sh

App

  • Change the Gunicorn binding in server.py to bind on a UNIX socket (/var/run/screenly.socket)
  • Remove the listen line in screenly.conf

Nginx

  • Re-configure Nginx to listen on listen on 8080 as well (80, 443, 8080)
  • Reconfigure Nginx the's 'ose' upstream to use the UNIX socket
  • Add a forwarding rule to redirect :8080 -> :443

vpetersson avatar Apr 28 '16 13:04 vpetersson

@over64 raised a good point. We might not want to do this as the default as it will throw an error message for all users (self-signed cert).

Perhaps we should instead not redirect everything to :443 by default, but rather make that conditional. We could do that with an include file or something similar.

vpetersson avatar Apr 28 '16 14:04 vpetersson

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Aug 13 '18 16:08 stale[bot]