title: WordPress W3 Total Cache Minify - JS and CSS Files Not Created (nginx)
body: <p>I have a WordPress site I'm trying to minify with W3 Total Cache.  It runs on nginx on Ubuntu 12.04.</p>
  
  <ul>
  <li>I am in <strong>manual</strong> minify mode</li>
  <li>In the minify settings, I have the <code>Rewrite URL structure</code> option OFF.  It doesn't work either way, but this method needs less nginx config.</li>
  </ul>
  
  <p>When I load the site, it tells WP to load from the following path:</p>
  
  <p><code>/wp-content/plugins/w3-total-cache/pub/minify.php?file=5fe99/default.include-body.baf22c.js</code></p>
  
  <p>Likewise, had I turned <code>Rewrite URL structure</code> ON, that path would be:
  <code>/wp-content/cache/minify/000000/5fe99/default.include-body.baf22c.js</code></p>
  
  <p>That file does not exist and it 404's if you try to go to it.</p>
  
  <p>Looking at that directory, I have:</p>
  
  <p><code>
  ~/public_html/wp-content/cache/minify/000000/5fe99$ ls -lah
  drwxrwxrwx 2 www-data www-data 4.0K Jun 26 08:51 .
  drwxrwxrwx 3 www-data www-data 4.0K Jun 26 08:51 ..
  -rw-r--r-- 1 www-data www-data   13 Jun 26 08:51 default.include-body.js.id
  -rwxrwxrwx 1 www-data www-data   13 Jun 26 08:23 default.include.css.id.old
  </code></p>
  
  <p><strong>Other potential solutions:</strong></p>
  
  <ul>
  <li>I've tried recursively doing a <code>chmod 777</code> on the entire cache directory, but it just never creates this file, nor does it report an error.</li>
  <li>I've successfully installed and used yui-compressor and Oracle Java, but the file still doesn't get created with that either.  So I know it's not a JSMin problem.</li>
  </ul>
  
  <p><strong>Contents of local nginx.conf file:</strong></p>
  
  <p>When <code>Rewrite URL structure</code> is OFF, this is all that is requested:</p>
  
  <p><code>
      # BEGIN W3TC Minify cache
      location ~ /home/MY_HOME_DIR/public_html/wp-content/cache/minify.*\.js$ {
          types {}
          default_type application/x-javascript;
          expires modified 31536000s;
          add_header Vary "Accept-Encoding";
          add_header Pragma "public";
          add_header Cache-Control "max-age=31536000, public";
      }
      location ~ /home/MY_HOME_DIR/public_html/wp-content/cache/minify.*\.css$ {
          types {}
          default_type text/css;
          expires modified 31536000s;
          add_header Vary "Accept-Encoding";
          add_header Pragma "public";
          add_header Cache-Control "max-age=31536000, public";
      }
      location ~ /home/MY_HOME_DIR/public_html/wp-content/cache/minify.*js\.gzip$ {
          gzip off;
          types {}
          default_type application/x-javascript;
          expires modified 31536000s;
          add_header Vary "Accept-Encoding";
          add_header Pragma "public";
          add_header Cache-Control "max-age=31536000, public";
          add_header Content-Encoding gzip;
      }
      location ~ /home/MY_HOME_DIR/public_html/wp-content/cache/minify.*css\.gzip$ {
          gzip off;
          types {}
          default_type text/css;
          expires modified 31536000s;
          add_header Vary "Accept-Encoding";
          add_header Pragma "public";
          add_header Cache-Control "max-age=31536000, public";
          add_header Content-Encoding gzip;
      }
      # END W3TC Minify cache
  </code></p>
  
  <p><strong>Another error:</strong></p>
  
  <p>Meanwhile, I also get this error:</p>
  
  <p><code>Recently an error occurred while creating the CSS / JS minify cache: A group configuration for "include-body" was not set.</code></p>
  
  <p>The plugin author has reported this as a frequent false positive, but that was two years ago.  I'm not sure what that means, there's not much good information on it.</p>
  
  <p>So... has <em>anyone</em> ever gotten file minification to work with W3 Total Cache on nginx?  Thanks!</p>