proxy/README.md

34 lines
819 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Proxy
Nginx прокси в Incus контейнере с SSL сертификатом.
## Установка
```bash
# Создание контейнера
incus launch images:alpine/edge proxy
# Настройка порта 443
incus config device add proxy port443 proxy listen=tcp:0.0.0.0:443 connect=tcp:127.0.0.1:443
# Вход в контейнер
incus exec proxy -- sh
# Установка пакетов
apk add nginx certbot
# Добавление в автозапуск
rc-update add nginx
# Настройка конфигурации
nano /etc/nginx/http.d/default.conf
# Запуск nginx
service nginx start
# Получение SSL сертификата
certbot -d "*.host.jeyerp.az" --manual --preferred-challenges dns certonly
# Перезапуск nginx
service nginx restart
```