Пробовал добаваить в /etc/nginx/bx/conf/bitrix_general.conf в секцию location ~* ^/(upload|bitrix/images|bitrix/tmp)
try_files $uri /bitrix/images/main/blank.gif;
не работает.
Пробовал в настройкий сайта добавлять в секцию server:
location /home/bitrix/www/upload {
try_files $uri /bitrix/images/main/blank.gif;
}
Тоже нет. Объясните что я делаю не так.
Весь блок server
# Default website
server {
listen 80 default_server;
server_name _;
server_name_in_redirect off;
auth_basic "Restricted Access";
auth_basic_user_file /etc/nginx/auth.htpasswd;
access_log /var/log/nginx/access.log main;
error_log /var/log/nginx/error.log warn;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $host:80;
set $proxyserver "http://127.0.0.1:8888";
set $docroot "/home/bitrix/www";
index index.php;
root /home/bitrix/www;
# Redirect to ssl if need
if (-f /home/bitrix/www/.htsecure) { rewrite ^(.*)$ https://$host$1 permanent; }
# custom options for sites; doesn't changes on update
include bx/site_settings/default/*.conf;
# Include parameters common to all websites
include bx/conf/letsencrypt-challenge-tokens.conf;
include bx/conf/bitrix.conf;
# Include server monitoring locations
include bx/server_monitor.conf;
location /upload {
try_files $uri /bitrix/images/main/blank.gif;
}
}