Well, unfortunately this is not working... http://example.com/style.css?ver=4.3 http://example.com/jquery-migrate.min.js?ver=1.2.1 biazus Wrote: ------------------------------------------------------- > Please try to remove $ in the end of the expression: > > something like this: > > location ~ .*\.(js|css) { > expires 7d; > } > > Also, make sure yoby log - Nginx Mailing List - English
Thank you, Biazus!by log - Nginx Mailing List - English
Following nginx configuration in a server block can cache js and css files with "js" or "css" as the end of the url. location ~ .*\.(js|css)?$ { expires 7d; } But it can't cache request such as: http: //example.com/jquery.js?ver=1.11.3&build=1 or http: //example.com/style.css?ver=4.3&build=1 Any way to cache csby log - Nginx Mailing List - English
Reinis, Great thanks for the your tips. Here is the update. This is for a wordpress blog, with http and https access. We dont need to redirect http traffic to https. In addition, I want to access it either by http: //example.com, http: //www.example.com, https: //example.com, or https: //www.example.com There are several problems caused by the following configuration. 1. http:// www.by log - Nginx Mailing List - English
I can not open any link except http://example.com/readme.txt with following server block. Any tips? server { listen 80 default_server; ## listen for ipv4; this line is default and implied listen [::]:80 default_server ipv6only=on; ## listen for ipv6 server_name example.com www.example.com *.example.com; # return 301 https://$server_name$request_uri; #}by log - Nginx Mailing List - English