login community faq

Hi, I am creating a Django project. I've linked this to 'mysite.com/foo'. The first application I have enabled is the admin site. I left the admin at the default url, '^admin/'. Now, when I visit the admin page for my new site/project here:

'mysite.com/foo/admin'

I get redirected to:

'mysite.com/admin/'

...and that URI yielded "Not Found".

Since I couldn't get the admin page working by linking my new project with a URI, I decided to create a subdomain for my site: 'foo.mysite.com'. My thinking is, I won't have to worry about redirects or root URIs getting in the way. Unfortunately, when I visit 'foo.mysite.com' it can't be found. And when I visit 'foo.mysite.com/admin' it can't be found either.

Any advice/hints?

asked Feb 04 '12 at 14:27

jimmy's gravatar image

jimmy
31


If you want to serve your app on a sub-path like mysite.com/foo, then you'll set FORCE_SCRIPT_NAME in your Django project settings, as described in our documentation: Mounting a Django Application on a Subpath

If you want to use a subdomain, then it should just work, provided that the subdomain is valid. If your domain uses WebFaction's DNS servers, then the subdomain should begin working a few minutes after you assign it to your site in the control panel (it could take longer, it just depends on how long it takes for your resolving DNS servers to pick it up). If your domain does not use WebFaction's DNS servers, then you'll need to create the subdomain and corresponding A record via your domain registrar's control panel (in addition to creating it in WebFaction's control panel).

Hope that helps!

answered Feb 04 '12 at 15:37

seanf's gravatar image

seanf ♦♦
55991220

Thanks Seanf. I've never really been able to figure out whether I use WebFaction's DNS servers or not. I have a namecheap account. When I first signed up, I was able to add the subdomain "www" via my Webfaction control panel. Can you tell I don't know much about how DNS and all that other crap works?

So, I added the 'foo' subdomain via my Webfaction control panel and it's finally working. This took about 2+ hours. I'm wondering why it takes so long but I guess that's on namecheap?

Thanks again for your help!

(Feb 04 '12 at 16:48) jimmy jimmy's gravatar image

You're very welcome!

(Feb 04 '12 at 16:52) seanf ♦♦ seanf's gravatar image
Your answer
If you have an answer to the above question, then use the form below. Otherwise, use the appropriate 'add new comment' button above to post your feedback.
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

Tags:

×641
×46
×34
×27

Asked: Feb 04 '12 at 14:27

Seen: 789 times

Last updated: Feb 04 '12 at 16:52

Plans & prices    Sign up    Why WebFaction?    Contact us    Affiliate program    Support    Legal    Jobs    Blog    Control panel login
Powered by OSQA
© Copyright 2003-2012 Swarma Limited - WebFaction is a service of Swarma Limited