diff --git a/nginx.conf b/nginx.conf index 988a0e3..e96a5ad 100644 --- a/nginx.conf +++ b/nginx.conf @@ -32,10 +32,10 @@ http { gzip on; - if (-e /usr/local/sites/passenger.conf) - { - include /usr/local/sites/passenger.conf; - } + #if (-e /usr/local/sites/passenger.conf) + #{ + # include /usr/local/sites/passenger.conf; + #} #passenger_default_user patrick; #passenger_friendly_error_pages off; diff --git a/passenger.conf-example b/passenger.conf-example new file mode 100644 index 0000000..ed5614c --- /dev/null +++ b/passenger.conf-example @@ -0,0 +1,4 @@ +# point these to your own environment's passenger and ruby +passenger_root /Library/Ruby/Gems/1.8/gems/passenger-3.0.7; +passenger_ruby /Users/patrick/.rvm/bin/ree-1.8.7-2011.03; + diff --git a/upstreams/aapp.conf b/upstreams/aapp.conf new file mode 100644 index 0000000..c6cf759 --- /dev/null +++ b/upstreams/aapp.conf @@ -0,0 +1,4 @@ +upstream aapp +{ + server localhost:3000 max_fails=3 fail_timeout=2s; +} diff --git a/upstreams/wingate-proxy.conf b/upstreams/wingate-proxy.conf new file mode 100644 index 0000000..c6bcc5c --- /dev/null +++ b/upstreams/wingate-proxy.conf @@ -0,0 +1,4 @@ +upstream wingate-proxy +{ + server localhost:4567 max_fails=3 fail_timeout=2s; +} diff --git a/virtualhosts/localhost.agencies.adobe.com.conf b/virtualhosts/localhost.agencies.adobe.com.conf new file mode 100644 index 0000000..cf0103c --- /dev/null +++ b/virtualhosts/localhost.agencies.adobe.com.conf @@ -0,0 +1,38 @@ +server +{ + listen 127.0.0.1:8080; + server_name localhost.agencies.adobe.com; + + root /usr/local/sites/adobe-agency-partner-portal/public; + index index.php index.html index.htm; + + if (!-e $request_filename) + { + rewrite ^(.*)-([0-9]+)\.(css|js|png|swf|xml)$ $1.$3 break; + } + + location ^~ / + { + proxy_pass_request_headers on; + proxy_ignore_headers Expires Cache-Control; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X_FORWARDED_PROTO https; + proxy_set_header Host $http_host; proxy_pass_header ATTENDEASE_PROXY_ACCESS_TOKEN; + proxy_pass_header jr_token; + proxy_pass_header HTTP_X_JR_TOKEN; proxy_pass_header X_JR_TOKEN; + proxy_pass_header Jr_token; + proxy_pass_header Set-Cookie; + proxy_pass http://aapp; + + gzip on; + gzip_min_length 1000; + gzip_proxied expired no-cache no-store private auth; + gzip_types text/plain text/css application/xml application/json application/javascript; + gzip_disable "MSIE [1-6]\."; + + if (-f $request_filename) + { + break; + } + } +} diff --git a/virtualhosts/localhost.max.adobe.com.conf b/virtualhosts/localhost.max.adobe.com.conf index 5caab7f..5354330 100644 --- a/virtualhosts/localhost.max.adobe.com.conf +++ b/virtualhosts/localhost.max.adobe.com.conf @@ -39,4 +39,25 @@ server gzip_types text/plain text/css application/xml application/json application/javascript; gzip_disable "MSIE [1-6]\."; } + + location ^~ /ae/ + { + rewrite ^/ae/(.*) /$1 break; + proxy_pass_request_headers on; + proxy_ignore_headers Expires Cache-Control; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X_FORWARDED_PROTO https; + proxy_set_header Host $http_host; proxy_pass_header ATTENDEASE_PROXY_ACCESS_TOKEN; + proxy_pass_header jr_token; + proxy_pass_header HTTP_X_JR_TOKEN; proxy_pass_header X_JR_TOKEN; + proxy_pass_header Jr_token; + proxy_pass_header Set-Cookie; + proxy_pass http://wingate-proxy; + + gzip on; + gzip_min_length 1000; + gzip_proxied expired no-cache no-store private auth; + gzip_types text/plain text/css application/xml application/json application/javascript; + gzip_disable "MSIE [1-6]\."; + } } diff --git a/virtualhosts/localhost.youthvoices.adobe.com.conf b/virtualhosts/localhost.youthvoices.adobe.com.conf index ae06f62..48651cd 100644 --- a/virtualhosts/localhost.youthvoices.adobe.com.conf +++ b/virtualhosts/localhost.youthvoices.adobe.com.conf @@ -11,11 +11,11 @@ server rewrite ^(.*)-([0-9]+)\.(css|js|png|swf|xml)$ $1.$3 break; } - rewrite ^/about/impact/$ /about/?tab=impact - rewrite ^/partners/sites/$ /partners/?tab=sites - rewrite ^/gallery/.* http://tv.adobe.com/show/adobe-youth-voices/ + rewrite ^/about/impact/$ /about/?tab=impact; + rewrite ^/partners/sites/$ /partners/?tab=sites; + rewrite ^/gallery/.* http://tv.adobe.com/show/adobe-youth-voices/; - error_page 404 /error/notfound.php + error_page 404 /error/notfound.php; location ~ \.php$ {