Permalink
Cannot retrieve contributors at this time
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
26 lines (22 sloc)
732 Bytes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Create a directory at /opt/smithereen/nginx_cache/images first! | |
proxy_cache_path /opt/smithereen/nginx_cache/images levels=1:2 keys_zone=sm_images:10m max_size=1G inactive=3650d; | |
server{ | |
server_name YOUR_DOMAIN_HERE; | |
client_max_body_size 40M; | |
location /i/ { | |
proxy_pass http://127.0.0.1:4560; | |
proxy_cache sm_images; | |
proxy_cache_lock on; | |
proxy_ignore_headers Cache-Control Expires; | |
proxy_cache_valid 3650d; | |
expires max; | |
} | |
location / { | |
proxy_pass http://127.0.0.1:4567; | |
proxy_set_header Host $host; | |
proxy_set_header X-Forwarded-For $remote_addr; | |
} | |
http2_push_preload on; | |
listen [::]:443 ssl http2; | |
listen 443 ssl http2; | |
} |