소스 검색

Más cosas en configuración de nginx

Tino 5 달 전
부모
커밋
6f4bb4b7d3
1개의 변경된 파일10개의 추가작업 그리고 0개의 파일을 삭제
  1. 10 0
      nginx/default.conf

+ 10 - 0
nginx/default.conf

@@ -24,6 +24,16 @@ server {
 
     location /media/ {
         alias /app/mediafiles/;
+	expires 1y;
+	add_header Cache-Control "public, max-age=31536000, immutable";
+
+	# Optimize for small files, combine small packets, and send directly
+	tcp_nodelay on;
+	tcp_nopush on;
+	sendfile on;
+
+	# Logging off for high-traffic image serving
+	access_log off;
     }
 
     error_page   500 502 503 504  /50x.html;