Sorry but or configurations vary on the nginx part. I'm not using nginx, just gunicorn.
Ben On Wed, Sep 3, 2014 at 11:26 AM, <[email protected]> wrote: > Hi Ben, > > Thanks for your reply. > > First a correction. When I said nginx.conf I should say: > /etc/nginx/sites-enabled/consoc.conf, where consoc.conf is the name of my > project. > > Could you please show how your /etc/nginx/sites-enabled/yourproject.conf > file looks like? > > Best regards. > > > Em quarta-feira, 3 de setembro de 2014 14h58min09s UTC-3, Ben Havilland > escreveu: >> >> These settings work for me, hope it helps: >> >> ################### >> # S3 STATIC FILES # >> ################### >> >> AWS_QUERYSTRING_AUTH = False >> AWS_ACCESS_KEY_ID = os.environ.get('AWS_ACCESS_KEY_ID') >> AWS_SECRET_ACCESS_KEY = os.environ.get('AWS_SECRET_ACCESS_KEY') >> AWS_STORAGE_BUCKET_NAME = 'AWSBUCKETNAMEGOESHERE' >> AWS_PRELOAD_METADATA = True #helps collectstatic do updates >> >> STATICFILES_STORAGE = 'storages.backends.s3boto.S3BotoStorage' >> DEFAULT_FILE_STORAGE = 'storages.backends.s3boto.S3BotoStorage' >> >> STATIC_URL = 'https://' + AWS_STORAGE_BUCKET_NAME + '.s3.amazonaws.com/' >> ADMIN_MEDIA_PREFIX = STATIC_URL + 'grappelli/' >> >> MEDIA_URL = 'https://' + AWS_STORAGE_BUCKET_NAME + '.s3.amazonaws.com/' >> >> >> On Wed, Sep 3, 2014 at 10:52 AM, <[email protected]> wrote: >> >>> Hello everyone, >>> >>> I have read some threads about problems in storing Mezzanine statics >>> files on S3, but I still didn't get it to work. Actually, my site is based >>> on Drum. >>> Static files are being collected to S3, but apparently the Webserver can >>> not find them and the site is messed up. Exception is the media folder >>> which is missing. >>> I guess my nginx.conf need to be updated. >>> >>> My settings are: >>> >>> settings.py >>> >>> #STATIC_URL = "/static/" >>>> AWS_STORAGE_BUCKET_NAME = "consocstatic" >>>> STATICFILES_STORAGE = 'storages.backends.s3boto.S3BotoStorage' >>>> S3_URL = 'http://%s.s3.amazonaws.com/' % AWS_STORAGE_BUCKET_NAME >>>> STATIC_URL = S3_URL >>> >>> >>> >>> nginx.conf >>> >>> location /static/ { >>>> root /home/ubuntu/consoc/project; >>>> access_log off; >>>> log_not_found off; >>>> } >>>> location /robots.txt { >>>> root /home/ubuntu/consoc/project/static; >>>> access_log off; >>>> log_not_found off; >>>> } >>>> location /favicon.ico { >>>> root /home/ubuntu/consoc/project/static/img; >>>> access_log off; >>>> log_not_found off; >>>> } >>>> } >>> >>> >>> Any help is appreciated. >>> >>> -- >>> You received this message because you are subscribed to the Google >>> Groups "Mezzanine Users" group. >>> To unsubscribe from this group and stop receiving emails from it, send >>> an email to [email protected]. >>> >>> For more options, visit https://groups.google.com/d/optout. >>> >> >> -- > You received this message because you are subscribed to the Google Groups > "Mezzanine Users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Mezzanine Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
