wiki:lighttpd_force_pdf_download
Table of Contents
lighttpd force pdf download
In lighttpd, to disable PDF opening in browser, add following config files in lighttpd.conf. This is useful in increasing CTR as browsers usually get stuck while loading PDF files.
$HTTP["url"] =~ "(.*)\.pdf" { mimetype.assign = (".pdf" =>"application/octet-stream") setenv.add-response-header = ( "Content-Disposition" => "attachment" ) }
Dont forget to enable setenv module, if not already done …
server.modules += ( "mod_setenv" )
service lighttpd reload
Tested on
See also
References
wiki/lighttpd_force_pdf_download.txt · Last modified: 2022/10/03 12:09 by antisa