Hello,
I use a reverse proxy under Nginx to allow my customers to access the quarantine zone.
It's functional, but I'd like to improve my configuration.
Currently I use this:
I would like to improve this location :
Currently I accept in the current directory all files css|png|gif|gif|js|ico|woff|woff|woff2|ttf.
But I wish I could target the right folder !
The idea is to better isolate static files. I have trouble finding the missing directories to use for these files.
Any leads you can offer me?
Thank
CG
I use a reverse proxy under Nginx to allow my customers to access the quarantine zone.
It's functional, but I'd like to improve my configuration.
Currently I use this:
Code:
location /quarantine {
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_http_version 1.1;
proxy_redirect off;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_pass https://lb-quarantine;
proxy_buffering off;
client_max_body_size 0;
proxy_next_upstream error timeout invalid_header http_500;
proxy_connect_timeout 2;
proxy_read_timeout 3600s;
proxy_send_timeout 3600s;
send_timeout 3600s;
}
location /api2/extjs/ {
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_http_version 1.1;
proxy_redirect off;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_pass https://lb-quarantine;
proxy_buffering off;
client_max_body_size 0;
proxy_next_upstream error timeout invalid_header http_500;
proxy_connect_timeout 2;
proxy_read_timeout 3600s;
proxy_send_timeout 3600s;
send_timeout 3600s;
}
location /api2/json/quarantine/ {
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_http_version 1.1;
proxy_redirect off;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_pass https://lb-quarantine;
proxy_buffering off;
client_max_body_size 0;
proxy_next_upstream error timeout invalid_header http_500;
proxy_connect_timeout 2;
proxy_read_timeout 3600s;
proxy_send_timeout 3600s;
send_timeout 3600s;
}
location /api2/htmlmail/quarantine/ {
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_http_version 1.1;
proxy_redirect off;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_pass https://lb-quarantine;
proxy_buffering off;
client_max_body_size 0;
proxy_next_upstream error timeout invalid_header http_500;
proxy_connect_timeout 2;
proxy_read_timeout 3600s;
proxy_send_timeout 3600s;
send_timeout 3600s;
}
location ~* ^.+.(css|png|gif|js|ico|woff|woff2|ttf)$ {
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_http_version 1.1;
proxy_redirect off;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_pass https://lb-quarantine;
proxy_buffering off;
client_max_body_size 0;
proxy_next_upstream error timeout invalid_header http_500;
proxy_connect_timeout 2;
proxy_read_timeout 3600s;
proxy_send_timeout 3600s;
send_timeout 3600s;
}
I would like to improve this location :
Code:
location ~* ^.+.(css|png|gif|js|ico|woff|woff2|ttf)$
Currently I accept in the current directory all files css|png|gif|gif|js|ico|woff|woff|woff2|ttf.
But I wish I could target the right folder !
The idea is to better isolate static files. I have trouble finding the missing directories to use for these files.
Any leads you can offer me?
Thank
CG