超碰中文网,91久久精品日日躁夜夜躁欧美,一区二区三区精品道,一区二区国产在线观看,亚洲精品中文字幕乱码一区二区,天天看片高清影视在线观看,久久99精品久久久久蜜桃,久久成人影视

VPS參考測評推薦
專注分享VPS主機優惠信息
衡天云優惠活動
熱網互聯2026年促銷活動
hostkvm優惠促銷活動
zji優惠促銷活動
QQGNET優惠促銷活動
QQGNET優惠促銷活動

便宜國外vps論壇_如何配置 Nginx Python-Telegram-Bot WebHook

主機參考:VPS測評參考推薦/專注分享VPS服務器優惠信息!若您是商家可以在本站進行投稿,查看詳情!此外我們還提供軟文收錄、PayPal代付、廣告贊助等服務,查看詳情!
我們發布的部分優惠活動文章可能存在時效性,購買時建議在本站搜索商家名稱可查看相關文章充分了解該商家!若非中文頁面可使用Edge瀏覽器同步翻譯!PayPal代付/收錄合作

https://github.com/python-telegram-bot/python-telegram-bot/wiki/Webhooks

Using nginx with one domain/port for all bots

All bots set their url to the same domain and port, but with a different url_path.

The integrated server should usually be started on the localhost or 127.0.0.1 address, the port can be any port you choose.

Note: example.com could be replaced by an IP address, if you have no domain associated to your server.

Example code to start the bot:

  1. updater.start_webhook(
  2. ? ? listen=’127.0.0.1′,
  3. ? ? port=5000,
  4. ? ? url_path=’TOKEN1′,
  5. ? ? webhook_url=’https://example.com/TOKEN1′,
  6. ? ? cert=open(‘cert.pem’, ‘rb’)
  7. )

復制代碼

Example configuration for nginx (reduced to important parts) with two bots configured:

  1. server {
  2. ? ? listen? ?? ?? ?? ???443 ssl;
  3. ? ? server_name? ?? ?? ?example.com;
  4. ? ? ssl_certificate? ???cert.pem;
  5. ? ? ssl_certificate_key private.key;
  6. ? ? location /TOKEN1 {
  7. ? ?? ???proxy_pass http://127.0.0.1:5000/TOKEN1/;
  8. ? ? }
  9. ? ? location /TOKEN2 {
  10. ? ?? ???proxy_pass http://127.0.0.1:5001/TOKEN2/;
  11. ? ? }
  12. }

復制代碼

請問 ‘cert.pem’ 這個文件從哪里來的?

各路大神回復說:

注冊說: ? ? ssl_certificate? ???cert.pem; ? ? ssl_certificate_key private.key; 這兩項是域名證書,申請了,把路徑地址替換就可以了

主機參考zhujicankao.com_收集國內外VPS,VPS測評,主機測評,云服務器,虛擬主機,獨立服務器,國內外服務器,高性價比建站主機相關優惠信息
詳細介紹和測評國外VPS主機,云服務器,國外服務器,國外主機的相關優惠信息,商家背景,網絡帶寬等等,也是目前國內最好的主機云服務器VPS參考測評資訊優惠信息分享平臺

這幾篇文章你可能也喜歡:

本文由主機參考刊發,轉載請注明:便宜國外vps論壇_如何配置 Nginx Python-Telegram-Bot WebHook http://m.k2270.com/55224.html

【騰訊云】領8888元采購禮包,搶爆款云服務器 每月 9元起,個人開發者加享折上折!
打賞
轉載請注明原文鏈接:主機參考 » 便宜國外vps論壇_如何配置 Nginx Python-Telegram-Bot WebHook
主機參考僅做資料收集,不對商家任何信息及交易做信用擔保,購買前請注意風險,有交易糾紛請自行解決!請查閱:特別聲明

評論 搶沙發

評論前必須登錄!