D
D
Denis Petrenko2021-06-24 19:15:37
Nginx
Denis Petrenko, 2021-06-24 19:15:37

How to expand the page parallel to the telegram bot?

There is a bot that works through a webhook on the mysite.ru website using POST requests. How can I get the index.html page, which is located in /var/www, by a regular get request when visiting the site mysite.ru?
Footnote about the server from the config:

server {
                listen 80;
                server_name mysite.ru www.mysite.ru;
                location / {
                        root /var/www;
                        index index.html;
                        }
                }

The rest of the config was not touched. After restarting nginx got the message:
nginx: [warn] conflicting server name "mysite.ru" on 0.0.0.0:80, ignored

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
ky0, 2021-06-24
@Termoslik

Spread across different server blocks with different host names, or relocate the bot to some URL not used by the site, to a separate location.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question