Greetings,
I am trying to access API over HTTPs on chirpstack v4, but getting 404 Not Found error.
I have v4.3.2 running on debian. HTTPs is configured via nginx. Chirpstack web GUI is working fine.
If I disable the nginx, web API also works and I am getting good responses. F.eg http://mydomain:8090/api/gateways?limit=10
is returning the gateway list.
But once I enable back nginx and ufw, above method does not work anymore, so does https://mydomain/api/gateways?limit=10
Can anyone help what I am doing incorrectly, kind of stuck
I have looked at this article - it says web API over HTTPs is not supported in V4?
here additional info:
environnment
BIND=0.0.0.0:8090
SERVER=0.0.0.0:8080'# Comment out to enable TLS
INSECURE=true
CORS=“*”
chirpstack.toml
'# API interface configuration.
[api]’ # interface:port to bind the API interface to.
bind=“0.0.0.0:8080”'# Secret.
'#
'# This secret is used for generating login and API tokens, make sure this
'# is never exposed. Changing this secret will invalidate all login and API
'# tokens. The following command can be used to generate a random secret:
'# openssl rand -base64 32
secret=“you-must-replace-this”[integration]
enabled=[“mqtt”][integration.mqtt]
server=“tcp://localhost:1883/”
json=true
nginx default
server {
location / { proxy_pass http://localhost:8080; } location ^~ /api { grpc_pass grpc://localhost:8090; } listen [::]:443 ssl ipv6only=on; # managed by Certbot listen 443 ssl; # managed by Certbot ssl_certificate /etc/letsencrypt/live/mydomain/fullchain.pem; # managed by Certbot ssl_certificate_key /etc/letsencrypt/live/mydomain/privkey.pem; # managed by Certbot include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
}
server {
if ($host = mydomain.com) {
return 301 https://$host$request_uri;
} # managed by Certbotlisten 80 ; listen [::]:80 ; server_name mydomain.com; return 404; # managed by Certbot
}
ufw
debian:/etc$ sudo ufw status
Status: activeTo Action From
22 ALLOW Anywhere
1700 ALLOW Anywhere
Nginx Full ALLOW Anywhere
22 (v6) ALLOW Anywhere (v6)
1700 (v6) ALLOW Anywhere (v6)
Nginx Full (v6) ALLOW Anywhere (v6)
Thanks