I understand the regexp. $1 = book.pdf So for the specific request in the example, we could write: location ~ ^/download/(.*)$ { alias /home/website/files/book.pdf; } Is it that the example is unrealistic? Because this config does exactly the same thing: location /download/ { alias /home/website/files/; } I'm struggling to see the difference, and why one would use the regexp.by graq - Nginx Mailing List - English
Hi From: http://wiki.nginx.org/HttpCoreModule __BEGIN__ For example: location ~ ^/download/(.*)$ { alias /home/website/files/$1; } The request "/download/book.pdf" will return the file "/home/website/files/book.pdf". Note again that only part of the request URI after the location is appended to the path defined by alias. ___END___ Why doesn't this return theby graq - Nginx Mailing List - English
I have some nginx configs that sometimes host mutiple domains and some file requests are mapped to the disk using some language. And example would be WordPress MultiSite. Where blog1.example.com/files/file1.jpg makes to blogs.dir/1/file1.jpg and someanotherblog3.example.com/files/file2.jpg maps to blogs.dir/45/file2.jpg These could be rewritting by hand individually to allow nginx to naturaby graq - Nginx Mailing List - English
kaspars Wrote: ------------------------------------------------------- > Btw, what kind of cache invalidation are you > using, if any? Is it only time based or do you use > nginx no_cache and cache_bypass directives > (http://wiki.nginx.org/HttpFcgiModule#fastcgi_no_c > ache) as well? It is a WordPress configuration, which relies on the nginx-proxy-cache-purge plugin to purby graq - Nginx Mailing List - English
kaspars Wrote: ------------------------------------------------------- > You could add $request_method to your cache_key > and this would store those requests in different > keys. Yes, of course. Thank you!by graq - Nginx Mailing List - English
I have registered with Uptime Robot. You can have it monitor a URL. It does this by sending a HEAD request every 5 to 10 minutes and checking for an OK response. This request triggers the fastcgi cache with an empty content. If I understand the wiki correctly I can't not cache HEAD requests (http://wiki.nginx.org/HttpFcgiModule#fastcgi_cache_methods). The only (dubious) fix this I can see at thby graq - Nginx Mailing List - English
I'm trying to set up fastcgi_cache with nginx+php-fpm. I can see directories appearing in my cache dir, but pages that I expect to return a cached hit, are downloaded (0 kb files) rather than served as a web page. I can see why it might be the default_type setting, but I don't know what else to set it to, or how to override the setting inside the location block. user www-data; worker_processesby graq - Nginx Mailing List - English