WebFaction
Community site: login faq

I'm having a similar problem to this getting my django media settings to serve appropriately. I'm running django 1.4.x. I've followed the webfaction instructions to setup two static web applications for my django project - one for static files, and one for media files.

My static path is being served by nginx correctly, but my media path is still being served by apache, and I'm hitting 404 errors. Restarting the server didn't seem to help.

Here are my settings.py config:

MEDIA_ROOT = '/home/<username>/webapps/media'
MEDIA_URL = 'http://<username>.webfactional.com/media/'
STATIC_ROOT = '/home/<username>/webapps/static'
STATIC_URL = 'http://<username>.webfactional.com/static/'

I also tried adding a symbolic link to the app, as mentioned here.

Why is this working correctly for static, but not media? Is there some configuration step that's different for media, or did I just miss something else?

asked 17 Feb '13, 21:45

ashapiro
12
accept rate: 0%

Could I ask you to please log a support ticket so that we can take a look at your installation? Thanks, Wayne K | WebFaction Support

(17 Feb '13, 22:21) waynek

Just added a ticket. Thanks.

(17 Feb '13, 22:24) ashapiro

Wayne helped me through the ticketing system.

You'll need to mount the media application using Webfaction's control panel to URL specified in your Django settings file.

Add the app under the Domains/Websites -> Website -> Contents -> Add a web app.

I knew there was something I forgot but I couldn't remember what.

permanent link

answered 17 Feb '13, 22:51

ashapiro
12
accept rate: 0%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×909
×186
×26

question asked: 17 Feb '13, 21:45

question was seen: 2,450 times

last updated: 17 Feb '13, 22:51

WEBFACTION
REACH US
SUPPORT
AFFILIATE PROGRAM
LEGAL
© COPYRIGHT 2003-2019 SWARMA LIMITED - WEBFACTION IS A SERVICE OF SWARMA LIMITED
REGISTERED IN ENGLAND AND WALES 5729350 - VAT REGISTRATION NUMBER 877397162
5TH FLOOR, THE OLD VINYL FACTORY, HAYES, UB3 1HA, UNITED KINGDOM