emptygif
Bahasa: Bahasa Indonesia

Semua bahasa dan framework

Apache HTTP Server Apache config

Snippet Apache config untuk Apache HTTP Server yang menjawab request ke /pixel.gif dengan empty GIF, yang di-decode sekali saat startup.

Apache HTTP Server Apache config

File
pixel.conf
Jalankan
apachectl graceful
# 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
# Needs mod_alias, mod_mime and mod_headers.
Alias "/pixel.gif" "/var/www/pixel.gif"

<Location "/pixel.gif">
    Require all granted
    ForceType image/gif
    Header set Cache-Control "no-store"
</Location>

Kami telah menjalankan snippet ini dan membandingkan byte yang dikembalikannya.

Periksa

curl -sI http://localhost:8080/pixel.gif

Situs resmi: Apache HTTP Server