I got OSQA running up and running on www.mysite.com but I would now like to change that to www.mysite.com/qa

What options need changing in order to do this?

asked 25 Jul '11, 14:14

esteve's gravatar image

esteve
8626
accept rate: 100%

edited 26 Jul '11, 11:00

rickross's gravatar image

rickross ♦♦
12.5k2914972


Well, the NOTE says it all, I just wasnt sure

In the settings_local.py change APP_URL from www.mysite.com to www.mysite.com/qa

In the /etc/httpd/conf.d/osqa.conf file change these lines: WSGISocketPrefix run/wsgi WSGIPythonHome /opt/ActivePython-2.6 WSGIPythonEggs /var/python/eggs

#NOTE: all urs below will need to be adjusted if
#settings.FORUM_SCRIPT_ALIAS !='' (e.g. = 'forum/')
#this allows "rooting" forum at [http://example.com/forum], if you like
Listen 8082
<VirtualHost *:8082>
    ServerAdmin admin@your.server.com
    DocumentRoot /opt/OSQA/forum
    **ServerName www.mysite.com/qa** # Change This line

#run mod_wsgi process for django in daemon mode
    #this allows avoiding confused timezone settings when
    #another application runs in the same virtual host
    WSGIDaemonProcess OSQA
    WSGIProcessGroup OSQA

#force all content to be served as static files
    #otherwise django will be crunching images through itself wasting time
    Alias /m/ /opt/OSQA/forum/skins/
    Alias /upfiles/ /opt/OSQA/forum/upfiles/
    <Directory /opt/OSQA/forum/skins>
            Order allow,deny
            Allow from all
    </Directory>

#this is your wsgi script described in the prev section
    #this is your wsgi script described in the prev section
    **WSGIScriptAlias /qa/ /opt/OSQA/osqa.wsgi** # Change This line

CustomLog /var/log/httpd/OSQA/access_log common
    ErrorLog /var/log/httpd/OSQA/error_log
</VirtualHost>

reset the http service and edit your robots.txt file located here: www.mysite.com/qa/admin/settings/robots/

Thats all there is to it!

Edited: Two of the lines I suggested changing (/m and /upfiles) should NOT be changed, since the path to the images remains the same.

link

answered 26 Jul '11, 10:55

esteve's gravatar image

esteve
8626
accept rate: 100%

edited 26 Jul '11, 14:33

I'd like to add that this fixes everything except updating robots.txt. You'll have to do that manually here: http://www.[domain].com/admin/settings/robots/

(26 Jul '11, 12:39) drewoid

Close, it should be www.mysite.com/qa/admin/settings/robot (since thats what i've changed the site to in this example).

(26 Jul '11, 13:15) esteve
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

Tags:

×298
×30

Asked: 25 Jul '11, 14:14

Seen: 379 times

Last updated: 26 Jul '11, 14:33

powered by OSQA