WebFaction
Community site: login 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 04 Feb '12, 14:27

jimmy
1316
accept rate: 0%


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!

permanent link

answered 04 Feb '12, 15:37

seanf
12.2k41836
accept rate: 37%

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!

(04 Feb '12, 16:48) jimmy

You're very welcome!

(04 Feb '12, 16:52) seanf
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:

×908
×76
×40
×32

question asked: 04 Feb '12, 14:27

question was seen: 3,790 times

last updated: 04 Feb '12, 16:52

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