Skip to content

Instantly share code, notes, and snippets.

@davidchambers
Created July 12, 2011 16:37
Show Gist options
  • Save davidchambers/1078375 to your computer and use it in GitHub Desktop.
Save davidchambers/1078375 to your computer and use it in GitHub Desktop.
Hashify nginx config
worker_processes 1;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
gzip on;
gzip_types text/css text/javascript application/x-javascript;
server {
listen 48419;
server_name hashify.me;
rewrite ^/(?:[A-Za-z0-9+/=]*|unpack:[A-Za-z0-9]+(?:,[A-Za-z0-9]+)*)$ /index.html last;
error_page 404 = @400;
error_page 500 = @500;
error_page 502 = @502;
error_page 503 = @503;
error_page 504 = @504;
location @400 { rewrite ^ http://hashify.me/IyA0MDAgQmFkIFJlcXVlc3Q=; }
location @500 { rewrite ^ http://hashify.me/IyA1MDAgSW50ZXJuYWwgU2VydmVyIEVycm9y; }
location @502 { rewrite ^ http://hashify.me/IyA1MDIgQmFkIEdhdGV3YXk=; }
location @503 { rewrite ^ http://hashify.me/IyA1MDMgU2VydmljZSBVbmF2YWlsYWJsZQ==; }
location @504 { rewrite ^ http://hashify.me/IyA1MDQgR2F0ZXdheSBUaW1lb3V0; }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment