Permalink
Browse files

enable dev

  • Loading branch information...
1 parent cec0213 commit f7730888a3297d884771a5a17be41e524353695b @feross committed Jun 20, 2012
Showing with 46 additions and 76 deletions.
  1. +46 −76 nginx.conf
View
@@ -1,19 +1,6 @@
-################################################################
-# instantfm.com
-# ---
-# For our production site, we add several performance improvements
-# to the server block below. Also, it's worth noting that many of the other
-# performance improvements we added to nginx are in the /etc/nginx/nginx.conf
-# file, since they don't belong in the server block. :)
-################################################################
-
# Enumerate all the Tornado servers here, USE NON-PUBLIC PORT
upstream instantfm-frontends {
server 127.0.0.1:7000;
-# We only need one server atm
-# server 127.0.0.1:7001;
-# server 127.0.0.1:7002;
-# server 127.0.0.1:7003;
}
# Only retry if there was a communication error, not a timeout
@@ -29,7 +16,7 @@ server {
}
server {
- listen 50.116.11.184:80 default_server deferred;
+ listen 50.116.11.184:80 default_server deferred;
server_name instantfm.com;
# Allow file uploads
@@ -82,83 +69,66 @@ server {
server {
listen 50.116.11.184:80;
- server_name www.instantfm.com;
+ server_name www.instantfm.com instant.fm www.instant.fm;
rewrite ^ http://instantfm.com$request_uri permanent;
}
################################################################
-# instant.fm
+# dev.instantfm.com
################################################################
+upstream dev-instantfm-frontends {
+ server 127.0.0.1:7010;
+}
+
server {
listen 50.116.11.184:80;
- server_name instant.fm;
- rewrite ^ http://instantfm.com$request_uri permanent;
+ server_name dev.instantfm.com;
+
+ auth_basic "Secret";
+ auth_basic_user_file /home/feross/www/AUTH/.htpasswd-dev.instantfm.com;
+
+ # Allow file uploads
+ client_max_body_size 50M;
+
+ root /home/feross/www/dev.instantfm.com/static;
+ index index.html;
+
+ # Try to serve static files
+ try_files $uri $uri/ @tornado;
+
+ # Also serve the root from tornado
+ location = / {
+ proxy_pass_header Server;
+ proxy_set_header Host $http_host;
+ proxy_redirect off;
+ proxy_set_header X-Real-IP $remote_addr;
+ proxy_set_header X-Scheme $scheme;
+ proxy_pass http://dev-instantfm-frontends;
+ }
+
+ # If there is no static file, send it to Tornado
+ location @tornado {
+ proxy_pass_header Server;
+ proxy_set_header Host $http_host;
+ proxy_redirect off;
+ proxy_set_header X-Real-IP $remote_addr;
+ proxy_set_header X-Scheme $scheme;
+ proxy_pass http://dev-instantfm-frontends;
+ }
}
server {
listen 50.116.11.184:80;
- server_name www.instant.fm;
- rewrite ^ http://instantfm.com$request_uri permanent;
+ server_name www.dev.instantfm.com;
+ rewrite ^ http://dev.instantfm.com$request_uri permanent;
}
-# ################################################################
-# # dev.instant.fm
-# ################################################################
-#
-# upstream dev-instantfm-frontends {
-# server 127.0.0.1:7100;
-# }
-#
-# server {
-# listen 50.116.11.184:80;
-# server_name dev.instant.fm;
-#
-# auth_basic "Secret";
-# auth_basic_user_file /home/feross/www/.htpasswd-dev.instant.fm;
-#
-# # Allow file uploads
-# client_max_body_size 50M;
-#
-# root /home/feross/www/dev.instant.fm/static;
-# index index.html;
-#
-# # Try to serve static files
-# try_files $uri $uri/ @tornado;
-#
-# # Also serve the root from tornado
-# location = / {
-# proxy_pass_header Server;
-# proxy_set_header Host $http_host;
-# proxy_redirect off;
-# proxy_set_header X-Real-IP $remote_addr;
-# proxy_set_header X-Scheme $scheme;
-# proxy_pass http://dev-instantfm-frontends;
-# }
-#
-# # If there is no static file, send it to Tornado
-# location @tornado {
-# proxy_pass_header Server;
-# proxy_set_header Host $http_host;
-# proxy_redirect off;
-# proxy_set_header X-Real-IP $remote_addr;
-# proxy_set_header X-Scheme $scheme;
-# proxy_pass http://dev-instantfm-frontends;
-# }
-# }
-#
-# server {
-# listen 50.116.11.184:80;
-# server_name www.dev.instant.fm;
-# rewrite ^ http://dev.instant.fm$request_uri permanent;
-# }
-#
-#
-# ################################################################
-# # dinkydogg.instant.fm
-# ################################################################
+################################################################
+# dinkydogg.instant.fm
+################################################################
#
# upstream dinkydogg-frontends {
# server localhost:7200;
@@ -169,7 +139,7 @@ server {
# server_name dinkydogg.instant.fm;
#
# auth_basic "Secret";
-# auth_basic_user_file /home/feross/www/.htpasswd-dev.instant.fm;
+# auth_basic_user_file /home/feross/www/.htpasswd-dev.instant.;
#
# # Allow file uploads
# client_max_body_size 50M;

0 comments on commit f773088

Please sign in to comment.