Hello,
I’m not an nginx user, so my error could be basic, but I am looking for some help.
I have a VPS which I have spun up with the sole purpose of hosting a rasa server. Lets call it chat.example.com
I have my normal website, and on one of the page, I want to call the chatbot. I do this using the rasa web widget. Lets call this example.com
If I set the websocket on example.com to http://chat.example.com:5005, the widget works fine.
However, as this will be a production bot in future, I want the call on example.com to be to: https://chat.example.com:5006
(I’m using 5006, as 5005 is being used by rasa).
To this end, I’ve set up nginx using the following:
server {
listen 5006 ssl;
server_name chat.example.com;
ssl_certificate /etc/letsencrypt/live/[REDACTED]/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/[REDACTED]/privkey.pem; # managed by Certbot
location / {
proxy_pass http://0.0.0.0:5005;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_redirect https://0.0.0.0:5006 http://0.0.0.0:5005;
}
}
However, the calls aren’t making it to rasa server.
When I edit the underlying call to be to http://chat.example.com:5005, it works fine so the server is running correctly. I think the issue is with nginx.
Can anyone help?