Welcome! Log In Create A New Profile

Advanced

Re: nginx equivalent for ExpiresByType / FilesMatch

June 12, 2017 09:40AM
Hello,

On 06/12/2017 09:36 AM, ST wrote:
> Hello,
>
> I continue to move my configuration from Apache to nginx and now need to
> convert following directives. Any hints?
>
> Thank you for all the previous help!
>
> 1.
>
> <IfModule mod_expires.c>
> # set up max-age header directive for certain file types for proper
> caching
> ExpiresActive on
> ExpiresByType text/css A604800
> ExpiresByType text/js A604800
> ...
>
>
> 2.
>
> # force download for ceratain file types
> <FilesMatch "\.(?i:fb2|mobi|mp3)$">
> Header set Content-Disposition attachment
> </FilesMatch>
> <FilesMatch "\.(?:fb2)$>
> Header set Content-type text/fb2+xml
> </FilesMatch>
>
> 3.
> Order Allow,Deny
> Allow from All
>
> # block certain files
> <Files dirs.inc>
> Order Allow,Deny
> Deny from All
> </Files>
>
>

http://nginx.org/en/docs/http/ngx_http_headers_module.html

http://nginx.org/en/docs/http/ngx_http_access_module.html

--
Jim Ohlstein
Profesional Mailman Hosting
https://mailman-hosting.com
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

nginx equivalent for ExpiresByType / FilesMatch

ST June 12, 2017 09:38AM

Re: nginx equivalent for ExpiresByType / FilesMatch

Jim Ohlstein June 12, 2017 09:40AM

Re: nginx equivalent for ExpiresByType / FilesMatch

pratyush June 12, 2017 12:40PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 71
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready