I’m attempting a python/django site and can’t get past this error.
Here’s some background:
- I’m porting this site from Heroku, the code itself is good.
- The machine starts up, but doesn’t seem accessible from outside, thus “Bad Request (400)” from browser.
- I’ve connected to the instance using “fly ssh console” and run a “wget http://localhost:8000” this produces and index.html file that indicates the site is running at port 8000.
- Running a “wget http://localhost” or “wget https://localhost” produces a “failed: Connection refused.” on each port (80 and 443, respectively)
From what I can tell, the site is running fine internally, but is not getting exposed externally.
My fly.toml looks like this:
# fly.toml file generated for wishlists on 2022-10-09T17:14:42-06:00
app = "wishlists"
kill_signal = "SIGINT"
kill_timeout = 5
#processes = []
[deploy]
release_command = "python manage.py migrate"
#[env]
# DEBUG = true
#[experimental]
# allowed_public_ports = []
# auto_rollback = true
[[services]]
# http_checks = []
internal_port = 8000
# processes = ["app"]
protocol = "tcp"
# script_checks = []
[services.concurrency]
hard_limit = 25
soft_limit = 20
# type = "connections"
[[services.ports]]
force_https = true
handlers = ["http"]
port = 80
[[services.ports]]
handlers = ["tls", "http"]
port = 443
[[services.tcp_checks]]
# grace_period = "1s"
# interval = "15s"
# restart_limit = 0
# timeout = "2s"
interval = 10000
timeout = 2000
# [[services.http_checks]]
# interval = 10000
# grace_period = "20s"
# method = "get"
# path = "/"
# protocol = "http"
# timeout = 2000
# tls_skip_verify = false
# [services.http_checks.headers]
#[[statics]]
# guest_path = "/app/public"
# url_prefix = "/static/"