Ask Your Question
1

How to run askbot under a subdirectory?

asked 2011-06-09 03:50:56 -0500

Fabio gravatar image Fabio flag of Italy
53 3 1 9
http://www.virtualb.it/

Askbot I installed on a server (CentOS + Apache) with a single IP address. On the same server are running the main site (php) and a Django site (version 1.3). Django Django is served under the subdirectory / (defined by the Directive WSGIScriptAlias ​​/ django) I would like to serve in a subdirectory askbot / forum, but even if they define the WSGIScriptAlias ​​/ forum url media continue to point to / m, while it should point to / forum / m Can anyone help me?

Fabio

delete close flag offensive retag edit

6 Answers

Sort by » oldest newest most voted
0

answered 2011-06-09 12:13:48 -0500

Evgeny gravatar image Evgeny flag of Chile
11329 50 84 183
http://askbot.org/

Hi there, yes it should work - in settings.py set ``ASKBOT_URL='somedir/'.

There must be no leading slash in the parameter. This setting was not tested recently, please give your feedback if you have any issues.

link publish delete flag offensive edit
0

answered 2011-06-09 16:02:13 -0500

Fabio gravatar image Fabio flag of Italy
53 3 1 9
http://www.virtualb.it/

Thanks for your reply.

WSGIScriptAlias ​​If set to '/ forum' and ASKBOT_URL to 'forum /' images are served to the URL '/ forum / forum / m / default / media / images /' (eg forum / forum / m / default / media / images / cc-Wiki.png? v = 1) but the URL is written by askbot '/ forum / m / default / media / images'.

If, instead, I set WSGIScriptAlias to '/' and ASKBOT_URL to 'forum /', askbot load properly, but I am no longer able to access my django site through the url http://localhost/django.

Fabio

link publish delete flag offensive edit

Comments

What do you expect to see at your /django url? I think WSGIScriptAlias "/" and ASKBOT_URL="forum/" should work, but if you need to see something at /django some view must be registered at that url in urls.py. Do you have anything besides a django project at your site (any other application - like a blog or anything else)? Sorry for the delay. Evgeny ( 2011-06-09 20:38:36 -0500 )edit
@Fabio, any success so far? Evgeny ( 2011-06-10 23:59:56 -0500 )edit
0

answered 2011-06-13 18:11:07 -0500

Fabio gravatar image Fabio flag of Italy
53 3 1 9
http://www.virtualb.it/

Nobody can help me?

Fabio

link publish delete flag offensive edit

Comments

Fabio, sorry I was offline for a while, can you skype me or call? Evgeny ( 2011-06-13 19:25:35 -0500 )edit
evgeny-fadeev 949-824-5842 (US), or email evgeny.fadeev@gmail.com I need more details from you to be able to help. Evgeny ( 2011-06-13 19:26:00 -0500 )edit
Your problem seems to be related to the webserver deployment, I'd make ASKBOT_URL /forum and WSGI script alias /, but the details may depend on your intentions and an what else you have on the same site. Evgeny ( 2011-06-13 19:28:48 -0500 )edit
just noticed that using /forum root url breaks two test cases! will fix them tomorrow. for example logo upload does not work. Evgeny ( 2011-06-15 03:44:17 -0500 )edit
0

answered 2011-06-18 15:06:17 -0500

Fabio gravatar image Fabio flag of Italy
53 3 1 9
http://www.virtualb.it/

Hi, Evgeny,

as suggested by you I try to install askbost as an app of django but without success. I have this error:

    [Sat Jun 18 16:47:12 2011] [error]   warnings.warn('Cannot translate loader: %s' % loader)
[Sat Jun 18 16:47:12 2011] [error] /usr/lib/python2.6/site-packages/Coffin-0.3.4-py2.6.egg/coffin/common.py:49: UserWarning: Cannot translate loader: askbot.skins.loaders.load_template_source
[Sat Jun 18 16:47:12 2011] [error]   warnings.warn('Cannot translate loader: %s' % loader)
[Sat Jun 18 16:47:12 2011] [error] [client 2.225.106.8] mod_wsgi (pid=16245): Exception occurred processing WSGI script '/opt/djroot/djadmin/apache/django.wsgi'.
[Sat Jun 18 16:47:12 2011] [error] [client 2.225.106.8] Traceback (most recent call last):
[Sat Jun 18 16:47:12 2011] [error] [client 2.225.106.8]   File "/usr/lib/python2.6/site-packages/django/core/handlers/wsgi.py", line 250, in __call__
[Sat Jun 18 16:47:12 2011] [error] [client 2.225.106.8]     self.load_middleware()
[Sat Jun 18 16:47:12 2011] [error] [client 2.225.106.8]   File "/usr/lib/python2.6/site-packages/django/core/handlers/base.py", line 45, in load_middleware
[Sat Jun 18 16:47:12 2011] [error] [client 2.225.106.8]     mod = import_module(mw_module)
[Sat Jun 18 16:47:12 2011] [error] [client 2.225.106.8]   File "/usr/lib/python2.6/site-packages/django/utils/importlib.py", line 35, in import_module
[Sat Jun 18 16:47:12 2011] [error] [client 2.225.106.8]     __import__(name)
[Sat Jun 18 16:47:12 2011] [error] [client 2.225.106.8]   File "/usr/lib/python2.6/site-packages/askbot-0.6.95-py2.6.egg/askbot/middleware/view_log.py", line 12, in <module>
[Sat Jun 18 16:47:12 2011] [error] [client 2.225.106.8]     from askbot.views.readers import questions as questions_view
[Sat Jun 18 16:47:12 2011] [error] [client 2.225.106.8]   File "/usr/lib/python2.6/site-packages/askbot-0.6.95-py2.6.egg/askbot/views/__init__.py", line 4, in <module>
[Sat Jun 18 16:47:12 2011] [error] [client 2.225.106.8]     from askbot.views import readers
[Sat Jun 18 16:47:12 2011] [error] [client 2.225.106.8]   File "/usr/lib/python2.6/site-packages/askbot-0.6.95-py2.6.egg/askbot/views/readers.py", line 36, in <module>
[Sat Jun 18 16:47:12 2011] [error] [client 2.225.106.8]     from askbot.templatetags import extra_tags
[Sat Jun 18 16:47:12 2011] [error] [client 2.225.106.8]   File "/usr/lib/python2.6/site-packages/askbot-0.6.95-py2.6.egg/askbot/templatetags/extra_tags.py", line 8, in <module>
[Sat Jun 18 16:47:12 2011] [error] [client 2.225.106.8]     from askbot.skins.loaders import get_template
[Sat Jun 18 16:47:12 2011] [error] [client 2.225.106.8]   File "/usr/lib/python2.6/site-packages/askbot-0.6.95-py2.6.egg/askbot/skins/loaders.py", line 121, in <module>
[Sat Jun 18 16:47:12 2011] [error] [client 2.225.106.8]     SKINS = load_skins()
[Sat Jun 18 16:47:12 2011] [error] [client 2.225.106.8]   File "/usr/lib/python2.6/site-packages/askbot-0.6.95-py2.6.egg/askbot/skins/loaders.py", line 116, in load_skins
[Sat Jun 18 16:47:12 2011] [error] [client 2.225.106.8]     skins[skin_name].set_language(django_settings.LANGUAGE_CODE)
[Sat Jun 18 16:47:12 2011] [error] [client 2.225.106.8]   File "/usr/lib/python2.6/site-packages/askbot-0.6.95-py2.6.egg/askbot/skins/loaders.py", line 96, in set_language
[Sat Jun 18 16:47:12 2011] [error] [client 2.225.106.8]     trans = translation.trans_real.translation(language_code)
[Sat Jun 18 16:47:12 2011] [error] [client 2.225.106.8] AttributeError: 'module' object has no attribute 'trans_real'
[Sat Jun 18 16:47:12 2011] [error] [client 2.225.106.8] File does not exist: /var/www/html/favicon.ico

Regads,

Fabio

link publish delete flag offensive edit
1

answered 2011-06-18 15:07:35 -0500

Fabio gravatar image Fabio flag of Italy
53 3 1 9
http://www.virtualb.it/

Solved! There was a line with USE_I18N = False. When I set USE_I18N to True the problem got solved.

link publish delete flag offensive edit

Comments

Great, thanks I've added a startup check that makes sure that USE_I18N is True, this problem won't show up again. Evgeny ( 2011-06-18 15:31:46 -0500 )edit
1

answered 2011-06-18 15:40:59 -0500

Fabio gravatar image Fabio flag of Italy
53 3 1 9
http://www.virtualb.it/

I have just run the command python manage.py add_missing_subscriptions and I think that there is a typo. I get the error is AttributeError: type object 'User' has no attribute 'object' and infact in the script add_missing_subscriptions there is the command User.object.all() that instead should be User.objects.all()

link publish delete flag offensive edit

Comments

Ok, just fixed this on the github repo. Thanks! Evgeny ( 2011-06-18 15:43:13 -0500 )edit

Your answer

Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Reliable Askbot Hosting

Create your Q&A site at askbot.com. Managed Askbot hosting at just $15/mo. Dedicated hosting, support contracts, consulting services.

create your Q&A site
30 days free trial

Question tools

Follow
1 follower

subscribe to rss feed

Stats

Asked: 2011-06-09 03:50:56 -0500

Seen: 245 times

Last updated: Jun 18 '11