docker-compose environment for the entire v.st system https://v.st/
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.
 
 
 
 
 
env/pixelfed/nginx.conf

48 lines
1.4 KiB

server {
server_name ${PIXELFED_HOSTNAME} ${PIXELFED_HOSTNAME}.${DOMAIN_NAME};
client_max_body_size 128m;
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 65;
types_hash_max_size 2048;
gzip on;
gzip_disable "msie6";
proxy_read_timeout 1800s;
# "GET /storage/m/_v2/502109601351254017/a48ad3dc0-89cf68/8vRxOkz65vOO/h4LB3lmyWrcyMxwcKeyJ8WTf3sEv3RVM8q5UYqA8.jpg HTTP/1.0"
# should go to data/pixelfed/storage/app/public/m/_v2/502109601351254017/a48ad3dc0-89cf68/8vRxOkz65vOO/h4LB3lmyWrcyMxwcKeyJ8WTf3sEv3RVM8q5UYqA8.jpg
# mapped to /pixelfed/storage
location /storage/ {
add_header X-Cache-Status STATIC;
alias /pixelfed/storage/app/public/;
#access_log off;
}
location / {
proxy_cache mycache;
add_header X-Cache-Status $upstream_cache_status;
# PHP adds an Expires header that is causing cache miss
proxy_ignore_headers Cache-Control Set-Cookie Expires;
proxy_cache_valid any 1m;
# logged in sessions and PUT bypass the cache
proxy_cache_methods GET HEAD;
proxy_no_cache $cookie_rl_user_id;
proxy_cache_bypass $cookie_rl_user_id;
proxy_pass http://pixelfed-app/;
#proxy_pass http://172.17.0.1:8080/;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
include /etc/nginx/includes/ssl.conf;
}