rasmusbergpalm / jslate

Write your dashboards in pure html/js
jslate.com
244 stars 54 forks source link

Nginx #49

Closed 1000io closed 11 years ago

1000io commented 11 years ago

Please! Help with nginx webserver. I've tried with this server config:

location /jslate { try_files $uri $uri/ /jslate/app/webroot/$args; }

Bu,t all .css, .js, images, etc can't be resolved Can you add a nginx config example in the documentation?

Thanks!

rasmusbergpalm commented 11 years ago

google nginx cakephp

1000io commented 11 years ago
    location /jslate {         
            if (-f $request_filename) {
                    break;
            }

            # Avoid recursivity
            if ($request_uri ~ /webroot/index.php) {
                    break;
            }

            rewrite ^/jslate$ /jslate/ permanent;
            rewrite ^/jslate/app/webroot/(.*) /jslate/app/webroot/index.php?url=$1 last;
            rewrite ^/jslate/(.*)$ /jslate/app/webroot/$1 last;
    }

works! Thanks @rasmusbergpalm, thanks Google, thanks http://stackoverflow.com/a/13975933