Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

executable file 255 lines (191 sloc) 6.555 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254
# user and group to run as
# user deploy http; # Controlled by `god`, see `god/nginx.rb`

# number of nginx workers
worker_processes 6;

# pid of nginx master process
# pid /srv/temp/pids/nginx.pid; # Controlled by `god`, see `god/nginx.rb`

# Number of worker connections. 1024 is a good default
events {
  worker_connections 1024;
}

# start the http module where we config http access.
http {
  # pull in mime-types. You can break out your config
  # into as many include's as you want to make it cleaner
  include /srv/conf/nginx/mime.types;
  
  # set a default type for the rare situation that
  # nothing matches from the mimie-type include
  default_type application/octet-stream;
  
  # configure log format
  log_format main '$remote_addr - $remote_user [$time_local] '
                  '"$request" $status $body_bytes_sent "$http_referer" '
                  '"$http_user_agent" "$http_x_forwarded_for"';
  
  # main access log
  access_log /srv/logs/nginx/access.log main;
  
  # main error log
  error_log /srv/logs/nginx/error.log debug;
  
  # no sendfile on OSX
  sendfile on;
  
  # These are good default values.
  tcp_nopush on;
  tcp_nodelay off;
  # output compression saves bandwidth
  gzip on;
  gzip_http_version 1.0;
  gzip_comp_level 2;
  gzip_proxied any;
  gzip_types text/plain
                  text/html
                  application/xhtml+xml
                  text/css
                  application/javascript
                  text/xml
                  application/xml
                  application/xml+rss
                  image/svg+xml
                  text/javascript;
  
  
  # Set the max size for file uploads to 50Mb
  client_max_body_size 50M;
  
  add_header X-Awesome-Doggie Tucker;
  
  root /srv/sites;
  
  index index.xhtml index.html index.txt;
  
  server { # Default
    server_name _;
    include /srv/conf/nginx/includes.conf;
    
    root /srv/sites/system;
  }
  
  server { # yreality.net
    server_name yreality.net;
    include /srv/conf/nginx/includes.conf;
    
    root /srv/sites/yreality.net;
  }
  
  server { # design.yreality.net
    server_name design.yreality.net;
    include /srv/conf/nginx/includes.conf;
    
    root /srv/sites/design.yreality.net;
    
    autoindex on;
  }
  
  upstream integrit {
    server 127.0.0.1:21100;
    #server 127.0.0.1:21101;
  }
  server { # integrit.yreality.net
    server_name integrit.yreality.net;
    include /srv/conf/nginx/includes.conf;
    
    root /srv/sites/integrit.yreality.net;
    
    location / {
      proxy_set_header X-Real-IP $remote_addr;
      proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
      proxy_set_header Host $http_host;
      proxy_redirect false;
      proxy_max_temp_file_size 0;
      
      # If the file exists as a static file, serve it directly, and break out.
      if (-f $request_filename) {
        break;
      }
      
      # Else, we know it's dynamic, let the app deal with it
      proxy_pass http://integrit;
    }
    
  }
  
  server { # elliottcable.name
    server_name elliottcable.name;
    include /srv/conf/nginx/includes.conf;
    
    root /srv/sites/elliottcable.name;
    
    rewrite ^/index.xml http://feeds.feedburner.com/elliottcable break;
  }
  
  server { # blog.elliottcable.name
    server_name blog.elliottcable.name;
    include /srv/conf/nginx/includes.conf;
    
    root /srv/sites/blog.elliottcable.name;
  }
  
  server { # by.elliottcable.name
    server_name by.elliottcable.name;
    include /srv/conf/nginx/includes.conf;
    
    root /srv/sites/by.elliottcable.name;
  }
  
  server { # design.elliottcable.name
    server_name design.elliottcable.name;
    include /srv/conf/nginx/includes.conf;
    
    root /srv/sites/design.elliottcable.name;
    
    autoindex on;
  }
  
  server { # stuff.elliottcable.name
    server_name stuff.elliottcable.name;
    include /srv/conf/nginx/includes.conf;
    
    root /srv/sites/stuff.elliottcable.name;
    
    autoindex on;
  }
  
  server { # pneumonoultramicroscopicsilicovolcanokoniosis.info
    server_name .pneumonoultramicroscopicsilicovolcanokoniosis.info;
    include /srv/conf/nginx/includes.conf;
    
    root /srv/sites/pumsvk.info;
  }
  
  server { # rubydie.net
    server_name .rubydie.com;
    include /srv/conf/nginx/includes.conf;
    
    root /srv/sites/rubydie.com;
  }
  
  server { # d20uaa.org
    server_name .d20uaa.org;
    include /srv/conf/nginx/includes.conf;
    
    root /srv/sites/d20uaa.org;
  }
  
  upstream thoth {
    server 127.0.0.1:12000;
    #server 127.0.0.1:12001;
  }
  server { # keyofnight.com
    server_name .keyofnight.com;
    include /srv/conf/nginx/includes.conf;
    
    root /srv/sites/keyofnight.com;
    
    location / {
      proxy_set_header X-Real-IP $remote_addr;
      proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
      proxy_set_header Host $http_host;
      proxy_redirect false;
      proxy_max_temp_file_size 0;
      
      # If the file exists as a static file, serve it directly, and break out.
      if (-f $request_filename) {
        break;
      }
      
      # Else, we know it's dynamic, let the app deal with it
      proxy_pass http://thoth;
    }
    
  }
  
  server { # ruby.davidczihak.at
    server_name ruby.davidczihak.at;
    include /srv/conf/nginx/includes.conf;
    
    root /srv/sites/ruby.davidczihak.at;
  }
  
  upstream talkie {
    # ip_hash;
    
    server unix:/srv/temp/sockets/thins.talkie/1.sock;
    server unix:/srv/temp/sockets/thins.talkie/2.sock;
    #server unix:/srv/temp/sockets/thins.talkie/3.sock;
    #server unix:/srv/temp/sockets/thins.talkie/4.sock;
    #server unix:/srv/temp/sockets/thins.talkie/5.sock;
  }
  server { # talkie.me
    server_name .talkie.me;
    include /srv/conf/nginx/includes.conf;
    
    root /srv/sites/talkie.me;
    
    location / {
      proxy_set_header X-Real-IP $remote_addr;
      proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
      proxy_set_header Host $http_host;
      proxy_redirect false;
      proxy_max_temp_file_size 0;
      
      location ~* (^/(style|script)|\.(jpg|jpeg|gif|png)$) {
        if (-f $request_filename) { expires max; break; }
        proxy_pass http://talkie;
      }
      
      if (-f $request_filename) { break; }
      proxy_pass http://talkie;
    }
    
  }
  server { # talkie.egopage.me
    server_name talkie.egopage.me;
    include /srv/conf/nginx/includes.conf;
    
    rewrite ^ http://talkie.me/ permanent;
  }
}
Something went wrong with that request. Please try again.