Jump to content

Question

Posted

Раньше использовал KeenDNS для доступа к домашнему серверу и, соответственно, веб-интерфейсу роутера. Недавно перешёл на собственный домен, соответственно пробросил 80 и 443 порты на сервер, а веб-интерфейс посадил на 8080 и 8443 соответственно. Чтобы упростить доступ и не вводить порт каждый раз, решил сделать доступ через новый домен, из подкаталога /router. В итоге открывается страница с заголовком KeeneticOS Web Panel, но это просто белый экран. Подскажите, пожалуйста, как грамотно реализовать такое?

Вот фрагмент конфига nginx:

server {
        listen 443 ssl http2;
        server_name [не скажу!];

        ssl_certificate [не скажу!];
        ssl_certificate_key [не скажу!];

        location / {
                proxy_pass http://localhost:8000;
                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_set_header X-Forwarded-Proto $scheme;

                proxy_set_header Upgrade $http_upgrade;
                proxy_set_header Connection "upgrade";
        }

        location /router {
                proxy_pass http://192.168.1.1:8080;
                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_set_header X-Forwarded-Proto $scheme;

                proxy_set_header Upgrade $http_upgrade;
                proxy_set_header Connection "upgrade";
        }
}

 

2 answers to this question

Recommended Posts

  • 1
Posted

С origin разобрался, это решало не ту проблему, с которой я столкнулся изначально, но помогло от невозможности залогиниться, когда перенёс веб-интерфейс на отдельный поддомен. Как я понял, он никаким образом не может знать, что сидит не в корне домена, а в отдельном каталоге, поэтому и нужные файлы пытается загрузить оттуда. 

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

This site uses cookies. By clicking "I accept" or continuing to browse the site, you authorize their use in accordance with the Privacy Policy.