Модуль 2. Задание 9-10.¶
Решение¶
ISP¶
Необходимые пакеты:
Отключаем базовые службы:
На всякий случай:
Включаем службу:
Конфигурируем /etc/nginx/sites-enabled.d/proxy.conf:
server {
lister 80;
server_name web.au-team.irpo;
location / {
auth_basic "web";
auth_basic_user_file /etc/nginx/.htpasswd;
proxy_pass http://172.16.1.2:8080;
}
}
server {
listen 80;
server_name docker.au-team.irpo;
location / {
auth_basic "docker";
auth_basic_user_file /etc/nginx/.htpasswd;
proxy_pass http://172.16.2.2:8080;
}
}
Создаём .htpasswd:
Перезапускаем nginx: