Python 电报bot don';不回答
我从certbot添加ssl证书。并尝试将其用于我的令牌、端口、url和其他。 我运行脚本,然后使用此链接检查状态Python 电报bot don';不回答,python,telegram,telegram-bot,Python,Telegram,Telegram Bot,我从certbot添加ssl证书。并尝试将其用于我的令牌、端口、url和其他。 我运行脚本,然后使用此链接检查状态https://api.telegram.org/bot827929874:AAELa-Dl6pYFM_test_test/getWebhookInfo并得到这个答案{“ok”:true,“result”:{“url”:https://my_site.com:88/827929874:AAELa-Dl6pYFM_test_test/“,“具有自定义_证书”:true,“挂起的_更新_
https://api.telegram.org/bot827929874:AAELa-Dl6pYFM_test_test/getWebhookInfo
并得到这个答案{“ok”:true,“result”:{“url”:https://my_site.com:88/827929874:AAELa-Dl6pYFM_test_test/“,“具有自定义_证书”:true,“挂起的_更新_计数”:32,“最大连接数”:40}
。我看到现在有32条消息在队列中等待。为什么机器人没有反应
UPD:
将nginx配置重写为:
server{
location / {
proxy_pass http://127.0.0.1:8000;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
}
listen 80; # managed by Certbot
listen 443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/site.com/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/site.comprivkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
}
在python脚本中将端口更改为443。如果请求在https://api.telegram.org/bot
电报的api有来自服务器的ping