This forum is no longer active. Please post your questions to our new community site

Change the root directory...?

Subscribe to Change the root directory...? 4 post(s), 2 voice(s)

Avatar guy 2 post(s)

Hi all, before I start I’d like to say this is awesome; I was trying to set up Django with IIS prior and that turned out very messy.

I’m a bit new to Apache/Django so bear with me please. I used the installer to make a project titled “osqa.” I have a pre-existing project with the same name that I dragged over to the folder, modified the file, made the table in mysql and ran syncdb.

My Django project loads, but not as I intend it to:

The broken banner at the top points to:

However, the banner lives here:

So I have 2 questions.

1. How can I resolve this?
2. What do I need to change to make default to ?

I’ve read this thread:…
And the problem seems almost identical, however there are a few things.
- Commenting out ‘DocumentRoot “${installdir}/apache2/htdocs” ’ gives me a 403 error when I try to load
- The django conf file that lives at "${installdir}/apps/django/conf/django.conf” does not have a line with “location” in it, nevermind a reference to the app itself. The django.wsgi file however did, but they looked like this:
sys.path.append(’C:/Users/me/BitNami DjangoStack projects’)
sys.path.append(‘C:/Users/me/BitNami DjangoStack projects\osqa’)
and I tried removing the second one and restarting the server with no different results.

Any insight into this would be great.

Thanks for reading!

Avatar Beltrán Rueda Administrator 3,714 post(s)

We are trying to reproduce it.

Avatar guy 2 post(s)

Thank you for the response Beltrán.

I’ve modified the django.conf file line with

WSGIScriptAlias /osqa “C:\Program Files\BitNami DjangoStack/apps/django/conf/django.wsgi”
and changed “/osqa” to “/”

Which leads me to a more desirable result:

However, on that landing page there is a 404 error; which actually makes sense because the default landing page should be the tab labeled “questions.” The reason for this is that Django actually has not specified a page named “osqa,” which is what I believe is trying to be accessed at the moment. I have this “osqa” environment on a linux machine [without DjangoStack] and going to “http://localhost/osqa” shows an identical page. At this point, I believe I need to change the default landing page, , to go to “questions” and hopefully everything will work.


So I tried doing this again:
- Commenting out ‘DocumentRoot “${installdir}/apache2/htdocs” ’

And everything appears to work fine. Thanks for the support, I no longer need it in this respect. My next objective is to change the backend from mysql to SQL [this is a work thing that they asked me to specifically do]. I will post again if I need assistance.

Avatar Beltrán Rueda Administrator 3,714 post(s)

I’m glad to hear that!