Ребята
Павел Межуев ky0 Алексей Тен, спасибо!
Ниже пример конфига. На каждый сайт отдельный конфиг
nginx-proxy
upstream dev {
server 172.17.1.1;
}
server {
listen 80;
server_name dev.example.com;
client_max_body_size 32m;
server_name_in_redirect off;
gzip on;
gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript application/javascript;
location / {
proxy_set_header Host $host;
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 X-Real-IP $remote_addr;
proxy_pass http://dev;
}
}
nginx-app
server {
listen 80;
server_name dev.example.com;
set $app_dir "/opt/app/dev/app";
root $app_dir;
index index.html;
client_max_body_size 32m;
access_log "/var/log/nginx/dev.access.log";
error_log "/var/log/nginx/dev.error.log";
location / {
root $app_dir;
index index.html;
add_header 'X-XSS-Protection' "1; mode=block;";
try_files $uri $uri/ /index.html =404;
}
}