Commit 5448b7b2 authored by Danir Tlepov's avatar Danir Tlepov

Fix DOCR-659

parent 84d352c7
...@@ -40,89 +40,44 @@ ...@@ -40,89 +40,44 @@
.. code-block:: xml .. code-block:: xml
location ~* /Synergy/rest/api/registry/data_ext { location ~* /sap/proxy/uservice/image {
add_header X-Cache-Status $upstream_cache_status; add_header X-Cache-Status $upstream_cache_status;
proxy_set_header Host $host; proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Real-IP $remote_addr;
proxy_pass http://127.0.0.1:8080; proxy_pass http://127.0.0.1:8080;
proxy_cache portal; proxy_cache portal;
proxy_ignore_headers Cache-Control Expires Set-Cookie; proxy_ignore_headers Cache-Control Expires Set-Cookie;
proxy_cache_valid 200 1h; proxy_cache_valid 200 1d;
proxy_cache_lock on; proxy_cache_lock on;
} }
location ~* /Synergy/rest/api/registry/data_ext {
location ~* /Synergy/rest/api/asforms/form_ext {
add_header X-Cache-Status $upstream_cache_status; add_header X-Cache-Status $upstream_cache_status;
proxy_set_header Host $host; proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Real-IP $remote_addr;
proxy_pass http://127.0.0.1:8080; proxy_pass http://127.0.0.1:8080;
proxy_cache portal; proxy_cache portal;
proxy_ignore_headers Cache-Control Expires Set-Cookie; proxy_ignore_headers Cache-Control Expires Set-Cookie;
proxy_cache_valid 200 1h; proxy_cache_valid 200 1h;
proxy_cache_lock on; proxy_cache_lock on;
} }
location ~* /Synergy/rest/api/formPlayer/documentIdentifier {
location ~* /Synergy/rest/api/asforms/data/get {
add_header X-Cache-Status $upstream_cache_status; add_header X-Cache-Status $upstream_cache_status;
proxy_set_header Host $host; proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Real-IP $remote_addr;
proxy_pass http://127.0.0.1:8080; proxy_pass http://127.0.0.1:8080;
proxy_cache portal; proxy_cache portal;
proxy_ignore_headers Cache-Control Expires Set-Cookie; proxy_ignore_headers Cache-Control Expires Set-Cookie;
proxy_cache_valid 200 1h; proxy_cache_valid 200 1h;
proxy_cache_lock on; proxy_cache_lock on;
} }
location ~* /Synergy/rest/api/storage/file/get { .. hint:: Настройки кэширования nginx задаются в файле ``/etc/nginx/nginx.conf`` строкой:
add_header X-Cache-Status $upstream_cache_status;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_pass http://127.0.0.1:8080;
proxy_cache portal; .. code-block:: xml
proxy_ignore_headers Cache-Control Expires Set-Cookie;
proxy_cache_valid 200 1h;
proxy_cache_lock on;
}
location ~* /Synergy/rest/api/storage/icons/get { proxy_cache_path /var/temp/nginx levels=1 keys_zone=portal:30m max_size=1G use_temp_path=off inactive=1d;
add_header X-Cache-Status $upstream_cache_status;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_pass http://127.0.0.1:8080;
proxy_cache portal; Подробное описание параметров можно `прочитать по ссылке <http://nginx.org/ru/docs/http/ngx_http_proxy_module.html#proxy_cache_path>`_.
proxy_ignore_headers Cache-Control Expires Set-Cookie;
proxy_cache_valid 200 1h;
proxy_cache_lock on;
}
location ~* /sap/proxy/uservice/image {
add_header X-Cache-Status $upstream_cache_status;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_pass http://127.0.0.1:8080;
proxy_cache portal;
proxy_ignore_headers Cache-Control Expires Set-Cookie X-Accel-Expires;
# proxy_cache_bypass $http_pragma;
proxy_cache_valid 200 1h;
proxy_cache_lock on;
access_log /var/log/nginx/sap.cache.log cache;
}
location ~* /Synergy/rest/api/formPlayer/documentIdentifier {
add_header X-Cache-Status $upstream_cache_status;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_pass http://127.0.0.1:8080;
proxy_cache portal;
proxy_ignore_headers Cache-Control Expires Set-Cookie;
proxy_cache_valid 200 1h;
proxy_cache_lock on;
}
Install/upgrade configuration Install/upgrade configuration
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment