Search Results

Search found 2 results on 1 pages for 'splintercell'.

Page 1/1 | 1 

  • caching static files for ruby on rails application using nginx

    - by splintercell
    I have been trying for some time to serve & cache static files for my rails app using nginx. the rails app server runs mongrel_cluster and is deployed on a different host than that of nginx. following many of the available discussions I tried the following server { listen 80; server_name www.myappserver.com; ssl on; root /var/apps/myapp/current/public; location ~ ^/(images|javascripts|stylesheets)/ { root /var/apps/myapp/current; expires 10y; } location / { proxy_pass http://myapp_upstream; } } But nginx fails to find the images and to load the css and js files. Can anyone help me out here? My aim is to configure nginx in such a way that it caches the static files till expiry. Please suggest me some way to achieve this or am I missing any point here?

    Read the article

  • how can multiple trailing slashes can be removed from an url in Ruby

    - by splintercell
    Hello, What i'm trying to achieve here is lets say we have two example urls: url1 "http://emy.dod.com/kaskaa/dkaiad/amaa//////////" & url2 = "http://www.example.com/". How can I extract the striped down urls? url1 : "http://emy.dod.com/kaskaa/dkaiad/amaa" & url2 to "http://http://www.example.com"? URI.parse in ruby sanitizes certain type of malformed url but is ineffective in this case. If we use regex then /^(.*)\/$/ removes a single slash (/) from url1 & is ineffective for url2. Is anybody aware of how to handle this type of url parsing? The point here is I dont want my system to have "http://www.example.com/" & "http://www.example.com" being treated as two different urls. And same goes for "http://emy.dod.com/kaskaa/dkaiad/amaa////" & "http://emy.dod.com/kaskaa/dkaiad/amaa/" cheers, -dg

    Read the article

1