Ask Your Question
1

Static files at webfaction not served

asked 2012-10-17 06:47:13 -0600

this post is marked as community wiki

This post is a wiki. Anyone with karma >100 is welcome to improve it.

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 ?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2012-10-17 12:33:44 -0600

this post is marked as community wiki

This post is a wiki. Anyone with karma >100 is welcome to improve it.

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

edit flag offensive delete link more

Comments

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

pije76 gravatar imagepije76 ( 2012-10-18 13:26:33 -0600 )edit
1

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

Evgeny gravatar imageEvgeny ( 2012-10-18 15:35:56 -0600 )edit

@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 gravatar imagepajju ( 2012-10-18 16:59:41 -0600 )edit
1

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

Evgeny gravatar imageEvgeny ( 2012-10-18 17:01:36 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2012-10-17 06:47:13 -0600

Seen: 569 times

Last updated: Oct 20 '12