You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
37 lines
1.1 KiB
37 lines
1.1 KiB
proxy_cache_path /var/cache/nginx/images levels=1:2 keys_zone=main_images:10m max_size=15g inactive=50d use_temp_path=on;
|
|
proxy_cache_valid 200 1d;
|
|
proxy_cache_valid 206 50d;
|
|
server {
|
|
listen 80;
|
|
#listen 443 ssl http2;
|
|
#ssl_certificate /etc/letsencrypt/live/predelanet.ru/fullchain.pem;
|
|
#ssl_certificate_key /etc/letsencrypt/live/predelanet.ru/privkey.pem;
|
|
server_name slave.predelanet.ru;
|
|
|
|
access_log /var/log/nginx/slave.predelanet.ru/access.log main;
|
|
error_log /var/log/nginx/slave.predelanet.ru/error.log warn;
|
|
|
|
charset utf8;
|
|
index index.php;
|
|
|
|
root /usr/share/nginx/html/images;
|
|
|
|
location / {
|
|
return 403;
|
|
}
|
|
|
|
location ~ ^/media/cache/images/(.*) {
|
|
try_files /$1 @main;
|
|
}
|
|
|
|
location @main {
|
|
proxy_pass https://www.predelanet.ru;
|
|
proxy_cache main_images;
|
|
proxy_cache_key $host$uri$is_args$args;
|
|
proxy_http_version 1.1;
|
|
proxy_ignore_headers Cache-Control;
|
|
#proxy_set_header Host $http_host;
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
}
|
|
}
|