Skip to content

Deployment

Keane Nguyen edited this page Jul 23, 2018 · 3 revisions

Generic Steps

  1. Install lost-n-phoned.
  2. Choose a WSGI server like Gunicorn, uWSGI, or Waitress and install it.
  3. Bind the WSGI server to localhost on a port other than 80 or 443.
  4. (Optional?) Set the WSGI server's url scheme to https. This tells the Flask app to generate https URLs.
  5. Run lostnphoned.app with the WSGI server.
  6. Choose a web server like Apache, Nginx, or Caddy and install it.
  7. Configure the server as a reverse-proxy. Forward requests to the WSGI server using regular HTTP. Tell the web server to pass the following headers to the WSGI server (so that Flask generates correct, publicly accessible URLs):
    • Host
    • X-Real-IP
  8. Make sure the web server uses HTTPS with visitors. This is required because OAuth2 will not work over HTTP. This step is somewhat involved.
  9. Run or restart the web server.
Clone this wiki locally