Nginx serving CSS/Images etc... both ways

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
tty
Reply | Threaded
Open this post in threaded view
|

Nginx serving CSS/Images etc... both ways

tty
at the Left hand menu under Apps....

If you click "Zurb Foundation" you see the zurb styling with javascript, css and images served via NGINX 

For example, the CSS is served via a nginx location block...

      location ~* .(css)$ {
	  try_files /zurb/css/$uri /zurb/css/building_blocks/$uri =400;
          expires 1y;
	  sendfile   on;
	  tcp_nopush on;
          default_type text/css;	
          add_header Content-Type: text/css;
	  
        }

However, if you select Apps->Twitter Bootstrap or Apps->JQuery UI  you will see that the css/images/javascript are not served.


This is because they are stored in a FileLibrary(?) internal to the application.

I realize that I *Could*  modify both web apps to use external CSS/Javascript etc....

However, if possible, I would prefer to have NGINX ignore the location ~* .(css) etc when accessing the locations for the apps...


        location /bootstrap {
	    proxy_pass http://127.0.0.1:8080;	
        }	
	
        location ~* ^/javascript/jquery-ui {
	    proxy_pass http://127.0.0.1:8080;	
        }

Any pointers greatly appreciated.

thx





_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside