-
-
Save keithmorris/a441038baf20c70eb8188db80c56b696 to your computer and use it in GitHub Desktop.
Revisions
-
surjikal revised this gist
Jul 15, 2013 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,6 @@ server { listen 80; server_name *.foo.example.com; # We need this to resolve the host, because it's a wildcard. # This is google's DNS server. -
surjikal created this gist
Jul 7, 2013 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,39 @@ server { listen 80; server_name *.dashboard.42debut.com; # We need this to resolve the host, because it's a wildcard. # This is google's DNS server. resolver 8.8.8.8; include /etc/nginx/includes/proxy.conf; # Don't show s3 errors proxy_intercept_errors on; error_page 403 404 500 502 503 @s3error; # Setup basic auth auth_basic "Restricted"; auth_basic_user_file /etc/nginx/conf/htpasswd.$host; error_page 403 404 500 502 503 @s3error; # Setup basic auth auth_basic "Restricted"; auth_basic_user_file /etc/nginx/conf/htpasswd.$host; # S3 derps if you send it the basic auth header proxy_set_header Authorization ""; location ~ ^/assets/(.*)$ { proxy_pass http://$host.s3.amazonaws.com/assets/$1; } location / { proxy_pass http://$host.s3.amazonaws.com/index.html; } location @s3error { internal; } }