简体   繁体   中英

404 in python flask application on EC2

i'm kinda new to all this, so bare with me

I'm trying to deploy my flask app to EC2, and before getting to set a WSGI server, id like to try to connect to port 8080 the code can be found here: https://github.com/Klasyer/POBAP

I've set the flask app host to 0.0.0.0 and port to 8080 In EC2 i opened the inbound rule for 8080

When i try to open the app through the web ( http://18.223.32.186:8080/ ) i get a 404.

What am i missing/doing wrong? Thanks ahead for any help

Try attaching an elastic IP address to the instance that your running and once it is done you can access the flask app running in the instance. But you should include the port number always while accessing it.

If you need the app to be accessed without the use of port number then in your flask app change the port number to 443 which is for HTTPS and 80 for HTTP. If you need HTTPS the process is somewhat different because you need to make a purchase but for HTTP it's free. So go on with HTTP by using the port number as 80

app.run(host='0.0.0.0', port=80)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM