3

Am running Flask application inside a docker container, the output of the application can be seen at http://localhost:5000.

How do i make configuration for this so that the url will be http://localhost/myapp (OR) in production something like https://www.ex.com/myapp ?

Learning
  • 716
  • 1
  • 7
  • 13

1 Answers1

8

you can run application with port 80 :

if __name__ == '__main__':
    app.run(host='0.0.0.0', port=80)

or you can use Proxy HTTP traffic to Flask through apache2/nginx.

Genuine
  • 264
  • 1
  • 7