Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
173 lines (142 sloc) 4.16 KB
server
{
listen 127.0.0.1:8080;
server_name localhost.max.adobe.com max2011 max.adobe.com;
root /usr/local/sites/2011.max.adobe.com;
index index.php index.html;
if (!-e $request_filename)
{
rewrite ^(.*)-([0-9]+)\.(css|js|png|swf)$ $1.$3 break;
}
# take care of some bad omniture code
rewrite ^/uber/(.*) http://www.adobe.com/uber/$1 permanent;
# support for individual session view
rewrite /schedule/by-session/.+/(.+)$ /schedule/by-session/session.php?id=$1 break;
# clean URLs for RSS
rewrite /rss/(.+).rdf$ /rss/$1.php break;
location ~ \.php$
{
#fastcgi_pass 127.0.0.1:9000;
fastcgi_pass unix:/tmp/php.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root/$fastcgi_script_name;
include fastcgi_params;
}
location ^~ /api/
{
#rewrite ^/api/(.*) /$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 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://attendease;
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]\.";
}
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 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]\.";
}
#location /mailinglist
#{
# passenger_enabled on;
# passenger_base_uri /mailinglist;
#}
location /blog/
{
#gzip_static on;
# if the requested file exists, return it immediately
if (-f $request_filename)
{
break;
}
set $supercache_file '';
set $supercache_uri $request_uri;
if ($request_method = POST)
{
set $supercache_uri '';
}
# Using pretty permalinks, so bypass the cache for any query string
if ($query_string)
{
set $supercache_uri '';
}
if ($http_cookie ~* "comment_author_|wordpress|wp-postpass_" )
{
set $supercache_uri '';
}
# if we haven't bypassed the cache, specify our supercache file
if ($supercache_uri ~ ^(.+)$)
{
set $supercache_file /blog/wp-content/cache/supercache/$http_host/$1index.html;
}
# only rewrite to the supercache file if it actually exists
if (-f $document_root$supercache_file)
{
rewrite ^(.*)$ $supercache_file break;
}
# all other requests go to Wordpress
if (!-e $request_filename)
{
rewrite . /blog/index.php last;
}
}
location /news/
{
#gzip_static on;
# if the requested file exists, return it immediately
if (-f $request_filename)
{
break;
}
set $supercache_file '';
set $supercache_uri $request_uri;
if ($request_method = POST)
{
set $supercache_uri '';
}
# Using pretty permalinks, so bypass the cache for any query string
if ($query_string)
{
set $supercache_uri '';
}
if ($http_cookie ~* "comment_author_|wordpress|wp-postpass_" )
{
set $supercache_uri '';
}
# if we haven't bypassed the cache, specify our supercache file
if ($supercache_uri ~ ^(.+)$)
{
set $supercache_file /blog/wp-content/cache/supercache/$http_host/$1index.html;
}
# only rewrite to the supercache file if it actually exists
if (-f $document_root$supercache_file)
{
rewrite ^(.*)$ $supercache_file break;
}
# all other requests go to Wordpress
if (!-e $request_filename)
{
rewrite . /news/index.php last;
}
}
}