Permalink
Browse files

Ch ch ch ch changes.

  • Loading branch information...
1 parent 9776194 commit 42291989500a70c6219dd4a578bec13634130421 @drlube drlube committed Aug 12, 2011
Showing with 114 additions and 1 deletion.
  1. +106 −1 virtualhosts/localhost.max.adobe.com.conf
  2. +8 −0 virtualhosts/localhost.theadobestudio.com.conf
@@ -1,7 +1,7 @@
server
{
listen 127.0.0.1:8080;
- server_name localhost.max.adobe.com max2011;
+ server_name localhost.max.adobe.com max2011 max.adobe.com;
root /usr/local/sites/2011.max.adobe.com;
index index.php index.html;
@@ -65,4 +65,109 @@ server
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;
+ }
+
+ }
+
}
@@ -11,6 +11,14 @@ server
{
rewrite ^(.*)-([0-9]+)\.(css|js|png|swf)$ $1.$3 break;
}
+
+ location /
+ {
+ if (!-e $request_filename)
+ {
+ rewrite ^.*$ /index.php last;
+ }
+ }
location ~ \.php(.*)$
{

0 comments on commit 4229198

Please sign in to comment.