Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7646593
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T10:14:56+00:00 2026-05-31T10:14:56+00:00

I’m using django-compressor and django-storages to serve my compressed files on S3 (using these

  • 0

I’m using django-compressor and django-storages to serve my compressed files on S3 (using these instructions: http://django_compressor.readthedocs.org/en/latest/remote-storages/#using-staticfiles). It works great initially after running the “compress” management command, but after about one hour the compressed css and js files return a 403 Forbidden error even though I haven’t made any changes to the files. I can’t seem to isolate the problem, so any help would be appreciated.

Here are the settings I am using:

COMPRESS_ENABLED = True  
COMPRESS_URL = "http://mybucket.s3.amazonaws.com/"  
COMPRESS_STORAGE = 'sm.storage.CachedS3BotoStorage'  
COMPRESS_YUI_BINARY = os.path.join(PROJECT_ROOT, 'jars/yuicompressor-2.4.7.jar')  
COMPRESS_CSS_FILTERS = ['compressor.filters.yui.YUICSSFilter',  
'compressor.filters.css_default.CssAbsoluteFilter']  
COMPRESS_JS_FILTERS = ['compressor.filters.yui.YUIJSFilter',]  
COMPRESS_OFFLINE = True  

STATICFILES_STORAGE = COMPRESS_STORAGE  
STATIC_URL = COMPRESS_URL  
STATIC_ROOT = '/path/to/static/'  
STATICFILES_DIRS = (  
os.path.join(PROJECT_ROOT, 'static'),  
)  

DEFAULT_FILE_STORAGE = 'storages.backends.s3boto.S3BotoStorage' # I'm using this for uploaded media  
AWS_ACCESS_KEY_ID = 'myaccesskey'  
AWS_SECRET_ACCESS_KEY = 'mysecretkey'  
AWS_STORAGE_BUCKET_NAME = 'mybucket'  
AWS_S3_FILE_OVERWRITE = True  

AWS_HEADERS = {  
'Cache-Control': 'public, max-age=31536000', #(1 year)  
}  

UPDATE: This only seems to be a problem when COMPRESS_OFFLINE is True. I set it to False and the compressed files that were created during the initial request are working correctly and it has been over an hour. However, I would prefer to pre compress these files using the management command.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T10:14:57+00:00Added an answer on May 31, 2026 at 10:14 am

    I was able to resolve this problem by adding this line to my settings file:

    AWS_QUERYSTRING_AUTH = False
    

    Credit goes to blackrobot on github.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have thousands of HTML files to process using Groovy/Java and I need to
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
That's pretty much it. I'm using Nokogiri to scrape a web page what has
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I am reading a book about Javascript and jQuery and using one of the
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and
We're building an app, our first using Rails 3, and we're having to build
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
We are using XSLT to translate a RIXML file to XML. Our RIXML contains

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.