title: How to use django-compressor with apache?
body: <p>I'm been using Django Compressor to manage my coffee/less files and its great for development, but I've had some issues to make it work for my production deployment.</p>
  
  <p>My idea is to have apache to host the static files, possibly in another server. I'm setting <code>COMPRESS_OFFLINE = True</code> on the <code>settings.py</code> file.</p>
  
  <p>Then I do the following</p>
  
  <ul>
  <li><code>python manage.py compress</code> - This populates the <code>CACHE</code> directory in my <code>static</code> directory, where all static files will be collected.</li>
  <li><code>python manage.py collectstatic</code> - This collects static files from all the apps on my project (some of which don't use compressor) into my <code>static</code> directory.</li>
  <li>Copy the <code>static</code> directory somewhere to be hosted with apache. And setup apache to serve the files.</li>
  <li>Modify the <code>static_url</code> variable in the <code>settings.py</code> file to point to the static server.</li>
  </ul>
  
  <p>If I open any page, I get the following error on my server, this only seems to happen when I have <code>DEBUG = False</code> and <code>COMPRESS_OFFLINE = True</code> on my <code>settings.py</code> file:</p>
  
  <blockquote>
    <p>TemplateSyntaxError: Caught OfflineGenerationError while rendering:
    You have offline compression enabled but key
    "777ba26736d046ab043dc151e7e9a060" is missing from offline manifest.
    You may need to run "python manage.py compress".</p>
  </blockquote>
  
  <p>When I check the <code>static/CACHE</code> directory, I confirm what the error says, this is my <code>manifest.json</code> file:</p>
  
  <pre><code>{
    "6189b8598993d1cbdbd35d4dfd1a6711": "&lt;script type=\"text/javascript\" src=\"http://192.168.1.123/CACHE/js/2f6ca6616bd6.js\"&gt;&lt;/script&gt;",
    "5c66dbed0e5b766c6e32773cd8585f3c": "&lt;link rel=\"stylesheet\" href=\"http://192.168.1.123/CACHE/css/154d95903951.css\" type=\"text/css\" /&gt;"
  }
  </code></pre>
  
  <p>If I delete the CACHE directory and rerun <code>python manage.py compress</code>, I get a new set of ID's both on the error message and the manifest file, but the ID on the error is still missing on the manifest.</p>
  
  <p>So, I guess there are two questions here. Why is it not working? What is the proper way to achieve this?</p>
  
  <p>Thanks.</p>