Syntax: | uwsgi_store
|
---|---|
Default: | uwsgi_store off; |
Context: | http , server , location |
Enables saving of files to a disk. The on
parameter saves files with paths corresponding to the directives alias or root. The off
parameter disables saving of files. In addition, the file name can be set explicitly using the string
with variables:
uwsgi_store /data/www$original_uri;
The modification time of files is set according to the received “Last-Modified” response header field. The response is first written to a temporary file, and then the file is renamed. Starting from version 0.8.9, temporary files and the persistent store can be put on different file systems. However, be aware that in this case a file is copied across two file systems instead of the cheap renaming operation. It is thus recommended that for any given location both saved files and a directory holding temporary files, set by the uwsgi_temp_path directive, are put on the same file system.
This directive can be used to create local copies of static unchangeable files, e.g.:
location /images/ { root /data/www; error_page 404 = /fetch$uri; } location /fetch/ { internal; uwsgi_pass backend:9000; ... uwsgi_store on; uwsgi_store_access user:rw group:rw all:r; uwsgi_temp_path /data/temp; alias /data/www/; }
Please login to continue.