Quantcast
Channel: Nginx Forum - How to...
Viewing all articles
Browse latest Browse all 4759

1.8.1 rewrite changes

$
0
0
I don't know if this is the new "right" behaviour mentioned in the changelog, but our rewrites stopped working after the upgrade to 1.8.1

I have an URL:
"http://mysite.com/css/main-responsive.v203.css"
Which should point to the file:
"/home/mysite/www/css/main-responsive.css"

The config, that works on 1.8.0 and not on 1.8.1 (returns 404) is this:

server {

listen 80;

server_name mysite.cz;
root /home/mysite/www/;
expires 100d;

location ^~ / {
access_log off;

location /css/ {
alias /home/mysite/www/css/;

location ~ /(.*)\.v[0-9]+\.(css) {
add_header Cache-Control public;
try_files $uri $uri/ /$1.$2;
}

location /css/fonts/ {
add_header Access-Control-Allow-Origin *;
}
}

location /js/ {
alias /home/mysite/www/js/;

location ~ /(.*)\.v[0-9]+\.(js) {
add_header Cache-Control public;
try_files $uri $uri/ /$1.$2;
}
}

location ^~ /img/ {
..........
}

.......
}

Could you please tell me, how exactly did the rewriting change in the 1.8.1 release? Thank you

Viewing all articles
Browse latest Browse all 4759

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>