- Open
/etc/nginx/nginx.conf
- Add this code block
server{
listen 80;
listen [::]:80;
server_name www.shivampip.com shivampip.com;
location / {
proxy_pass http://127.0.0.1:5005;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
}
}
- server_name must be domain name. Not subdomain (it will not get ssl certificate)
- SSL certificate is required for Telegram connection.
- Self-signed SSL won't work here.
- Good doc: https://letsencrypt.org/getting-started/
- Follow it to generate SSL certificate for your domain: https://certbot.eff.org/
- in
credentials.yml
setup telegram webhook url:
webhook_url: "https://www.shivampip.com/webhooks/telegram/webhook"
- Install dependencies.
- Run it with cmd
nohup rasa run
nohup
is for keep it running even after terminal is closed
- Kill all rasa process
pkill rasa
rasa run --enable-api
rasa run --cors "*"