[nginx_gzip_static] Necessity to create empty file with always option.

Richard Fussenegger richard at fussenegger.info
Tue Nov 17 18:31:40 UTC 2015


Thanks for the answer and solution!

Sorry for using the wrong mailing list, will not happen again.

Richard

On 11/17/2015 7:29 PM, Valentin V. Bartenev wrote:
> On Tuesday 17 November 2015 19:15:43 Richard Fussenegger wrote:
>> Hi guys!
>>
>> I have the following weird situation: Several files with .gz extension
>> are on disk and I have a location were requests are processed that do
>> not include it, so I set the option gzip_static to always and also
>> installed the gunzip module. The problem is, I still need to create
>> EMPTY files without the .gz extension on disk for everything to work as
>> expected. Expected is that gunzip extracts the archives if no GZIP
>> support is announced by the client and nginx directly streams the
>> response if the client did.
>>
>> The configuration is fairly easy:
>>
>>     location /var/files {
>>         internal;
>>
>>         gunzip on;
>>         gzip_proxied any;
>>         gzip_static always;
>>
>>         aio on;
>>         sendfile off;
>>         tcp_nodelay on;
>>         tcp_nopush off;
>>
>>         try_files $uri =404;
>>     }
> [..]
>
> Why do you have this useless "try_files $uri =404;" directive here?
> It causes your problem.
>
> Please note, that this mailing list is for developers.  You should ask
> questions in user's one: http://mailman.nginx.org/mailman/listinfo/nginx
>
>   wbr, Valentin V. Bartenev
>
> _______________________________________________
> nginx-devel mailing list
> nginx-devel at nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx-devel

-- 

Liebe Grüße,
*Richard Fussenegger, MSc*

Web <http://richard.fussenegger.info/> · Mail
<mailto:richard at fussenegger.info> · Skype <callto:richard.fussenegger> ·
Phone (+49 176 4245 3664) <tel:+49-176-4245-3664>

Richard Fussenegger Logo

Tückingstr. 50, 41460 Neuss, NRW, Deutschland

Ich bevorzuge verschlüsselte E-Mails. Der Fingerabdruck meines
öffentlichen Schlüssels lautet |917D AF3F 5A0A AE6C 8661 2330 C24B E2A6
A907 11B9|.
Lerne auch du, wie du deine E-Mails verschlüsseln kannst:
E-Mail-Selbstverteidigung <https://emailselfdefense.fsf.org/de/>



More information about the nginx-devel mailing list