Приложение 13. Конфигурационный файл hub.conf
Пример конфигурационного файла hub.conf
server {
listen 8080;
server_name appsechub.company.ru;
ignore_invalid_headers off;
proxy_connect_timeout 600;
proxy_send_timeout 600;
proxy_read_timeout 600;
send_timeout 600;
client_max_body_size 0;
#limit_conn connections 90;
location / {
root /usr/share/nginx/html;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Server $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
add_header X-Frame-Options SAMEORIGIN;
location ~* \.(jpg|gif|png|js|pdf|svg|html|css|ttf)$ {
expires 3d;
}
}
location /hub/ {
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Server $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
add_header X-Frame-Options SAMEORIGIN;
proxy_pass http://gateway:8080/hub/;
}
location /sso {
proxy_set_header X-Forwarded-Port 443;
proxy_set_header X-Forwarded-Proto https;
proxy_set_header X-Forwarded-Scheme https;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Scheme https;
proxy_set_header upgrade-insecure-requests 1;
proxy_pass http://hub-sso:8080/sso;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
listen 4443 ssl;
ssl_certificate /etc/ssl/certs/ssl-cert/fullchain1.pem;
ssl_certificate_key /etc/ssl/certs/ssl-cert/privkey1.pem;
if ($scheme != "https") {
return 301 https://$host$request_uri;
}
}