First time here? Check out the FAQ!
1

Static files at webfaction not served
 

I deployed askbot on webfaction server by following the instructions at http://community.webfaction.com/questions/8400/need-help-for-askbot-installation. I also have done to run python2.7 manage.py collectstatic and the DEBUG setting are False

When I visit my website (androidterengganu.com) it looks like the following image: http://dl.dropbox.com/u/750152/askbot.png

All the css & image rendering is gone. Am I missing some step ?

To enter a block of code:

  • enter empty line after your previous text
  • paste or type the code
  • select the code and press the button above
Preview: (hide)
updated 12 years ago
This post is a wiki. Anyone with karma >100 is welcome to improve it.

Comments

see more comments

1 Answer

2

You have to create another app in Webfaction - a Static Only app. And point it to say /m to serve the site Static content.

To enter a block of code:

  • enter empty line after your previous text
  • paste or type the code
  • select the code and press the button above
Preview: (hide)
answered 12 years ago
This post is a wiki. Anyone with karma >100 is welcome to improve it.
link

Comments

ah yes, I forget to add a static symlink and point to /m. thanks pajju

pije76's avatar pije76 (12 years ago)
1

You could also create another one to serve /upfiles - the user-uploaded files more efficiently.

Evgeny's avatar Evgeny (12 years ago)

@Evgeny isn't uploads be handled by django only? Because we have some django logic that checks for each user, whether he is allowed to upload files (there is a check for minimum reputation points to have before uploading and that is to be handled by django app) And so just because of this logic the front-end server in this case nginx should not be used for that. Please correct me if I'm wrong somewhere. :)

pajju's avatar pajju (12 years ago)
1

Uploads are handled by django, but serving of the uploaded files is better done directly by the webserver (nginx/apache, etc.)

Evgeny's avatar Evgeny (12 years ago)
see more comments