WebFaction
Community site: login faq
0
1

I know that I could just change the location of static files to ~/webapps/django/static in my settings (in this case, Django's settings.py), however I want to maintain the same static dir location across all my instances of this site (some not on Webfaction). I would just replace the ~/webapps/django/static directory with a symlink to my preferred location, ~/www/static, however ~/webapps is owned by root so I cannot delete it or change it's name. The best I can do right now is to create symlinks inside ~/webapps/django/static for every directory inside ~/www/static. But this is not ideal because I may add new directories inside ~/www/static and I don't want to have to remember to create new symlink. Is there any other way to tell nginx to go to ~/www/static for all static requests?

asked 02 Nov '12, 23:41

rgerkin
11
accept rate: 0%

~/webapps/django/static would be contained within ~/webapps/django, which is a directory you own. Can you tell us specifically what error you're getting when trying to create a symbolic link from within this directory? You shouldn't get a permission denied error since you own ~/webapps/django.

(03 Nov '12, 00:07) ryans ♦♦

Hi,

Only ~/webapps is owned by root. The ~/webapps/django/ directory is owned by your user and so is everything underneath it. You should be able to symlink ~/webapps/django/static to ~/www/static without any problems. You can also create a symlink application from the control panel. There are 2 different types of symlink applications, Static/CGI/PHP and Static-only. All you need to do is put in the path /home/youruser/www/static/ and it will create an application ~/webapps/newstaticappname.

Hope that helps!

permanent link

answered 03 Nov '12, 00:12

klynton
1.6k1210
accept rate: 41%

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
×125

question asked: 02 Nov '12, 23:41

question was seen: 2,495 times

last updated: 03 Nov '12, 00:12

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