Tag Info

New answers tagged

0

You have to set the Page Rule in the CloudFlare Admin panel. The first step to using Page Rules is to define a pattern that defines when the rule is triggered. These patterns can be simple, such as a single URL, or complicated including multiple wildcards. Imagine you have a content management system with a single URL: http://www.testlifeinuk.com Now if ...


0

A quote from nginx documentation: If the longest matching prefix location has the “^~” modifier then regular expressions are not checked. So, the problem here is your location ^~ /app definition. The ^ modifier makes nginx ignore the regular expression for the images. You should use location /app instead. You don't need regular expression matching in ...


-1

I guess that problem is "~*", try just with "~". Example: location ~ \.(?:ico|css|js|gif|jpe?g|png)$


0

my five cents on the issue - in our PHP project we have few 404 pages, so I decide to do it on PHP level using PHP header() functions


2

You need to increase the size of shared memory on keys_zone instead of max_size. Stealing answer from this thread keys_zone=api-data-cache:8m was defining shared memory zone named api-data-cache with maximum size 8 MB. It holds all active keys and metadata of the cache. So, whenever nginx checks if a page was cached, it consults the shared memory zone ...


0

Yes, it does change a registry setting: Key: HKCU\Software\Policies\Microsoft\Windows\Explorer Value: DisableThumbsDBOnNetworkFolders You can download the settings spreadsheet here: Group Policy Settings Reference for Windows and Windows Server https://www.microsoft.com/en-us/download/details.aspx?id=25250


0

First of all you need to check if your nginx has cache purge module with nginx -V 2>&1 | grep nginx-cache-purge If yes then add following block to your nginx conf. location ~ /purge(/.*) { fastcgi_cache_purge WORDPRESS "$scheme$request_method$host$1"; } now if you want to update any page, purge its cache by visiting url suppose ...


2

You can do it this way too : map $status $cache_header { default <for_other_codes>; 404 "no-cache" } server { [ ... ] add_header "Cache-Control" $cache_header always; }


2

Can't you get by with using an error_page directive, and then handle the location separately with the added header? e.g. in Nginx: server { ... error_page 404 /404.html; location = /404.html { root /usr/share/nginx/html; add_header Cache-Control "no-cache" always; } }


0

Chrome stores SSL certificate state per host in browser history. So just clear browser history (Ctrl+Shift+Del), at least the following parts: Cached images and files Hosted app data Content licenses


0

The best you could reasonably do would be to work with your internet providers to try and get a topologically close connection to a CDN, such as Akamai. (eg. have a Akamai node at your internet exchange.) Not sure how useful that would be, but considering that the bulk of commodity data is from things like video, it may be worthwhile. You may also get some ...


0

No. The point of using SSL is not just encrypting the data, so that noone could see your password, or validating that you are really logging in to your bank account and not some scammer. It is a privacy tool as well. When using SSL noone is able to see what kind of content you are transfering (although from IP they still may be able to guess which site). ...


0

The Goolge image proxy is caching. You can easily test this by embedding an image into an e-mail and send it to an Gmail account you have control over. Reload the page a few times (with dropped cache of course). The cache gets hit, your server will not receive any request. It's unclear if the same cached URL/file gets served to multiple users. Maybe this ...


2

Nginx interprets a bunch of headers when used as a reverse proxy to honor HTTP intermediate caches specifications. This means the following headers, if present in your app replies, will change caching behaviour as explained : The “X-Accel-Expires” header field sets caching time of a response in seconds. The zero value disables caching for a ...


4

Sending Last-Modified headers in your app replies is a start but it seems you don't handle If-Modified-Since properly on incoming requests because your app should reply 304 Not Modified and not 200 OK. Changing the directive on nginx only impact requests served directly by nginx i.e. static ressources unless you configure it as a reverse proxy cache. In this ...


0

Since you have not mentioned anything about your cache configuration in Nginx, I'm going to assume you did not set a cache, and this would explain why your If-Modified-Since header has no effect for dynamic responses. When it comes to static resources, Nginx has a really easy way to determine how to handle If-Modified-Since: it compares the time in the ...


3

Let us read the manual page for the underlying library call: Programs can use posix_fadvise() to announce an intention to access file data in a specific pattern in the future, thus allowing the kernel to perform appropriate optimizations. The advice applies to a (not necessarily existent) region starting at offset and extending for len bytes (or ...


1

Perhaps you can try this workaround for your problem include on your configuration file a file named expiration.conf In your expiration.conf write: Header set Expires "Tue, 28 Apr 2015 20:00:00 GMT" And reload apache. Of course you should create your date dinamically each day.


2

Stealing Explaining the ideas from VBart and sendmoreinfo Please don't use insecure FTP, especially for doing an action on permission-sensitive directory. The alternative is: Use SSH with normal user and give sudo permission to particular script who doing nginx-cache clearance. For example put this script in /opt/clear-cache.sh. #!/bin/sh rm -rf ...



Top 50 recent answers are included