nginx (static file) nginx
/pixel.gif కు వచ్చే రిక్వెస్ట్లకు empty GIF తో జవాబిచ్చే, nginx (static file) కోసం nginx స్నిపెట్. GIF స్టార్టప్లో ఒక్కసారే డీకోడ్ అవుతుంది.
nginx (static file) nginx
# Write the file once: printf '%b' '\x47\x49\x46\x38\x39\x61\x01\x00\x01\x00\x80\x00\x00\xff\xff\xff\x00\x00\x00\x21\xf9\x04\x01\x00\x00\x00\x00\x2c\x00\x00\x00\x00\x01\x00\x01\x00\x00\x02\x02\x44\x01\x00\x3b' > /var/www/pixel.gif
server {
listen 8080;
location = /pixel.gif {
alias /var/www/pixel.gif;
types { }
default_type image/gif;
add_header Cache-Control "no-store";
}
}
మేము ఈ స్నిపెట్ను రన్ చేసి, అది తిరిగి ఇచ్చిన బైట్లను పోల్చి చూశాం.
చెక్ చేయండి
curl -sI http://localhost:8080/pixel.gif
అధికారిక సైట్: nginx (static file)