Skip to content

Instantly share code, notes, and snippets.

@inossidabile
Created March 19, 2012 22:26
Show Gist options
  • Save inossidabile/2127685 to your computer and use it in GitHub Desktop.
Save inossidabile/2127685 to your computer and use it in GitHub Desktop.
Hashbang nginx config sample
upstream hashbang-localhost {
server localhost:22333;
}
server {
listen 80;
server_name ...;
location / {
if ( $request_uri ~ _escaped_fragment_= ) {
proxy_pass http://hashbang-localhost/?url=http://$host$request_uri;
}
root ...;
passenger_enabled on;
}
}
server {
listen 22333;
server_name localhost;
location / {
limit_conn perserver 5;
root .../hashbang/public;
passenger_enabled on;
}
}
class ApplicationPage
@afterLoad ->
@bind 'loaded', -> Sunscraper?.finish()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment