|
#1 by Anonymous (Nobody) at 08 Apr 2014 14:35:05 GMT
| I see, I supopse that would have to be the case. |
#2 by Anonymous (Nobody) at 11 Apr 2014 02:58:58 GMT
| Hi Danny,I think this may work for you, by changing your cruernt location block to the following:location ~* .(js|css|png|jpg|jpeg|gif|ico|html|htm)$ { expires 30d;}That location block will go inside of the configuration file for your virtual host. So if your vhost configuration file is /etc/nginx/vhosts/danny.com then the location block would go inside of the danny.com file, and also inside of the server { } block. Something like this:server { listen 80; server_name danny.com # ... the rest of your virtual host configuration stuff goes here location ~* .(js|css|png|jpg|jpeg|gif|ico|html|htm)$ { expires 30d; }}What's the URL to your site? Also, you can check if the cache-control and expires are working using the curl command, like this:curl -I If everything is set up correctly you would see this in the curl header output:Expires: Wed, 19 Jun 2013 16:55:02 GMTCache-Control: max-age=31536000Cheers http://jthfnkpwkn.com [url=http://ueekmhriafi.com]ueekmhriafi[/url] [link=http://awupmyk.com]awupmyk[/link] |
|