Website works through <static_ip>:<port> but cannot figure out how to point

0

Hello,

I am using AWS LightSail with my website written using Python's Flask. The website itself works on my own machine and when I connect directly to <static_ip>:<port>. Going to <my_website>.com displays "’s server IP address could not be found."

The goal: Access the website through <my_website>.com

To achieve this, I put the four name servers into the custom DNS on namecheap.com. In LightSail DNS, I have A record set as @.<my_website>.com. I fiddled with these things recently, so this might be an issue.

I start my website through: gunicorn --bind 0.0.0.0:8000 wsgi:app

A lot of tutorials discuss nginx as a proxy server but I am not entirely sure if that's relevant. I believe it's simply to remove external access to the web app.

However, in https://blog.miguelgrinberg.com/post/the-flask-mega-tutorial-part-xvii-deployment-on-linux , he uses Nginx with ports 80 and 443, so I am a bit confused.

It is not entirely clear to me if Nginx is used for this and if so, how to adjust the config files to enable my use case.

It is also not clearly to me how I would even go about debugging this.

Edit:

I should add I have the instance, static ip, dns zone and a distribution. Though I suppose that's obvious from what I've written.

Edited by: jgybpe on Mar 4, 2021 12:51 PM

Edit:

Solved it by abandoning LightSail and going at it directly. This video helped:
https://www.youtube.com/watch?v=VedY6EjOBWM

Edited by: jgybpe on Mar 6, 2021 5:31 AM

jgybpe
질문됨 3년 전181회 조회
1개 답변
0
jgybpe
답변함 3년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인