First time here? Check out the FAQ!

Revision history  [back]

How to install askbot on Ubuntu with LAMP?

I've failed so far to install askbot on Ubuntu 10.10 using Apache and a MySql db. I am currently running OSQA installed by following those instructions : http://wiki.osqa.net/display/docs/Ubuntu+with+Apache+and+MySQL . In fact, Askbot works by running :

python manage.py runserver localhost:8000

But I would like to deploy it on my apache server alongside with OSQA for testing purpose.

Here my default configuration file for Apache :

# Must be readable and writable by apache
WSGISocketPrefix ${APACHE_RUN_DIR} 

    <VirtualHost *:80>

    ServerAdmin webmaster@localhost

DocumentRoot /var/www

#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

<Directory />
    Options FollowSymLinks
    AllowOverride None
</Directory>

<Directory /var/www/>
    Options Indexes FollowSymLinks MultiViews
    AllowOverride None
    Order allow,deny
    allow from all
    AddHandler mod_python .py
    PythonHandler mod_python.publisher
    PythonDebug On
</Directory>

ScriptAlias /cgi-bin/ /var/www/cgi-bin/
<Directory "/var/www/cgi-bin">
    AllowOverride None
    Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
    AddHandler cgi-script cgi pl
    Order allow,deny
    Allow from all
</Directory>

ErrorLog ${APACHE_LOG_DIR}/error.log

# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn

CustomLog ${APACHE_LOG_DIR}/access.log combined

Alias /doc/ "/usr/share/doc/"
<Directory "/usr/share/doc/">
    Options Indexes MultiViews FollowSymLinks
    AllowOverride None
    Order deny,allow
    Deny from all
    Allow from 127.0.0.0/255.0.0.0 ::1/128
</Directory>

#this is your wsgi script described in the prev section
WSGIScriptAlias / /var/www/osqa/osqa.wsgi

CustomLog ${APACHE_LOG_DIR}/osqa.access.log common
ErrorLog ${APACHE_LOG_DIR}/osqa.error.log
    </VirtualHost>

The osqa.wsgi file in /var/www/osqa :

import os
import sys
sys.path.append('/var/www/')
sys.path.append('/var/www/osqa')
# The first part of this module name should be identical to the directory name 
# of the OSQA source.  For instance, if the full path to OSQA is 
# /home/osqa/osqa-server, then the DJANGO_SETTINGS_MODULE should have a value
# of 'osqa-server.settings'.
os.environ['DJANGO_SETTINGS_MODULE'] = 'osqa.settings'
import django.core.handlers.wsgi
application = django.core.handlers.wsgi.WSGIHandler()

I am not quite sure how to modify those files to make askbot work. I installed askbot in /var/www/ask :

$user:/var/www$ ls ask
askbot  __init__.py  log  manage.py  settings.py  urls.py ask.wsgi

How to install askbot on Ubuntu with LAMP?

I've failed so far to install askbot on Ubuntu 10.10 using Apache and a MySql db. I am currently running OSQA installed by following those instructions : http://wiki.osqa.net/display/docs/Ubuntu+with+Apache+and+MySQL . In fact, Askbot works by running :

python manage.py runserver localhost:8000

But I would like to deploy it on my apache server alongside along with OSQA for testing purpose.

Here my default configuration file for Apache :

# Must be readable and writable by apache
WSGISocketPrefix ${APACHE_RUN_DIR} 

    <VirtualHost *:80>

    ServerAdmin webmaster@localhost

DocumentRoot /var/www

#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

<Directory />
    Options FollowSymLinks
    AllowOverride None
</Directory>

<Directory /var/www/>
    Options Indexes FollowSymLinks MultiViews
    AllowOverride None
    Order allow,deny
    allow from all
    AddHandler mod_python .py
    PythonHandler mod_python.publisher
    PythonDebug On
</Directory>

ScriptAlias /cgi-bin/ /var/www/cgi-bin/
<Directory "/var/www/cgi-bin">
    AllowOverride None
    Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
    AddHandler cgi-script cgi pl
    Order allow,deny
    Allow from all
</Directory>

ErrorLog ${APACHE_LOG_DIR}/error.log

# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn

CustomLog ${APACHE_LOG_DIR}/access.log combined

Alias /doc/ "/usr/share/doc/"
<Directory "/usr/share/doc/">
    Options Indexes MultiViews FollowSymLinks
    AllowOverride None
    Order deny,allow
    Deny from all
    Allow from 127.0.0.0/255.0.0.0 ::1/128
</Directory>

#this is your wsgi script described in the prev section
WSGIScriptAlias / /var/www/osqa/osqa.wsgi

CustomLog ${APACHE_LOG_DIR}/osqa.access.log common
ErrorLog ${APACHE_LOG_DIR}/osqa.error.log
    </VirtualHost>

The osqa.wsgi file in /var/www/osqa :

import os
import sys
sys.path.append('/var/www/')
sys.path.append('/var/www/osqa')
# The first part of this module name should be identical to the directory name 
# of the OSQA source.  For instance, if the full path to OSQA is 
# /home/osqa/osqa-server, then the DJANGO_SETTINGS_MODULE should have a value
# of 'osqa-server.settings'.
os.environ['DJANGO_SETTINGS_MODULE'] = 'osqa.settings'
import django.core.handlers.wsgi
application = django.core.handlers.wsgi.WSGIHandler()

I am not quite sure how to modify those files to make askbot work. I installed askbot in /var/www/ask :

$user:/var/www$ ls ask
askbot  __init__.py  log  manage.py  settings.py  urls.py ask.wsgi

How to install askbot on Ubuntu with LAMP?

I've failed so far to install askbot on Ubuntu 10.10 using Apache and a MySql db. I am currently running OSQA installed by following those instructions : http://wiki.osqa.net/display/docs/Ubuntu+with+Apache+and+MySQL . In fact, Askbot works by running :

:
    python manage.py runserver localhost:8000

But I would like to deploy it on my apache server along with OSQA for testing purpose.

Here my default configuration file for Apache :

# Must be readable and writable by apache
WSGISocketPrefix ${APACHE_RUN_DIR} 

    <VirtualHost *:80>

    ServerAdmin webmaster@localhost

DocumentRoot /var/www

#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

<Directory />
    Options FollowSymLinks
    AllowOverride None
</Directory>

<Directory /var/www/>
    Options Indexes FollowSymLinks MultiViews
    AllowOverride None
    Order allow,deny
    allow from all
    AddHandler mod_python .py
    PythonHandler mod_python.publisher
    PythonDebug On
</Directory>

ScriptAlias /cgi-bin/ /var/www/cgi-bin/
<Directory "/var/www/cgi-bin">
    AllowOverride None
    Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
    AddHandler cgi-script cgi pl
    Order allow,deny
    Allow from all
</Directory>

ErrorLog ${APACHE_LOG_DIR}/error.log

# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn

CustomLog ${APACHE_LOG_DIR}/access.log combined

Alias /doc/ "/usr/share/doc/"
<Directory "/usr/share/doc/">
    Options Indexes MultiViews FollowSymLinks
    AllowOverride None
    Order deny,allow
    Deny from all
    Allow from 127.0.0.0/255.0.0.0 ::1/128
</Directory>

#this is your wsgi script described in the prev section
WSGIScriptAlias / /var/www/osqa/osqa.wsgi

CustomLog ${APACHE_LOG_DIR}/osqa.access.log common
ErrorLog ${APACHE_LOG_DIR}/osqa.error.log
    </VirtualHost>

The osqa.wsgi file in /var/www/osqa :

import os
import sys
sys.path.append('/var/www/')
sys.path.append('/var/www/osqa')
# The first part of this module name should be identical to the directory name 
# of the OSQA source.  For instance, if the full path to OSQA is 
# /home/osqa/osqa-server, then the DJANGO_SETTINGS_MODULE should have a value
# of 'osqa-server.settings'.
os.environ['DJANGO_SETTINGS_MODULE'] = 'osqa.settings'
import django.core.handlers.wsgi
application = django.core.handlers.wsgi.WSGIHandler()

I am not quite sure how to modify those files to make askbot work. I installed askbot in /var/www/ask :

$user:/var/www$ ls ask
askbot  __init__.py  log  manage.py  settings.py  urls.py ask.wsgi

How to install askbot on Ubuntu with LAMP?

Hi,

I've failed so far to install askbot on Ubuntu 10.10 using Apache and a MySql db. I am currently running OSQA installed by following those instructions : http://wiki.osqa.net/display/docs/Ubuntu+with+Apache+and+MySQL . In fact, Askbot works by running : python manage.py runserver localhost:8000 But I would like to deploy it on my apache server along with OSQA for testing purpose.http://wiki.osqa.net/display/docs/Ubuntu+with+Apache+and+MySQL

Here my default configuration file for Apache :

# Must be readable and writable by apache
WSGISocketPrefix ${APACHE_RUN_DIR} 

    <VirtualHost *:80>

    ServerAdmin webmaster@localhost

DocumentRoot /var/www

#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

<Directory />
    Options FollowSymLinks
    AllowOverride None
</Directory>

<Directory /var/www/>
    Options Indexes FollowSymLinks MultiViews
    AllowOverride None
    Order allow,deny
    allow from all
    AddHandler mod_python .py
    PythonHandler mod_python.publisher
    PythonDebug On
</Directory>

ScriptAlias /cgi-bin/ /var/www/cgi-bin/
<Directory "/var/www/cgi-bin">
    AllowOverride None
    Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
    AddHandler cgi-script cgi pl
    Order allow,deny
    Allow from all
</Directory>

ErrorLog ${APACHE_LOG_DIR}/error.log

# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn

CustomLog ${APACHE_LOG_DIR}/access.log combined

Alias /doc/ "/usr/share/doc/"
<Directory "/usr/share/doc/">
    Options Indexes MultiViews FollowSymLinks
    AllowOverride None
    Order deny,allow
    Deny from all
    Allow from 127.0.0.0/255.0.0.0 ::1/128
</Directory>

#this is your wsgi script described in the prev section
WSGIScriptAlias / /var/www/osqa/osqa.wsgi

CustomLog ${APACHE_LOG_DIR}/osqa.access.log common
ErrorLog ${APACHE_LOG_DIR}/osqa.error.log
    </VirtualHost>

The osqa.wsgi file in /var/www/osqa :

import os
import sys
sys.path.append('/var/www/')
sys.path.append('/var/www/osqa')
# The first part of this module name should be identical to the directory name 
# of the OSQA source.  For instance, if the full path to OSQA is 
# /home/osqa/osqa-server, then the DJANGO_SETTINGS_MODULE should have a value
# of 'osqa-server.settings'.
os.environ['DJANGO_SETTINGS_MODULE'] = 'osqa.settings'
import django.core.handlers.wsgi
application = django.core.handlers.wsgi.WSGIHandler()

I am not quite sure how to modify those files to make askbot work. I installed askbot in /var/www/ask :

$user:/var/www$ ls ask
askbot  __init__.py  log  manage.py  settings.py  urls.py ask.wsgi

How to install askbot on Ubuntu with LAMP?

Hi,

I've failed so far to install askbot on Ubuntu 10.10 using Apache and a MySql db. I am currently running OSQA installed by following those instructions : http://wiki.osqa.net/display/docs/Ubuntu+with+Apache+and+MySQL

Here my default configuration file for Apache :

# Must be readable and writable by apache
WSGISocketPrefix ${APACHE_RUN_DIR} 

    <VirtualHost *:80>

    ServerAdmin webmaster@localhost

DocumentRoot /var/www

#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

<Directory />
    Options FollowSymLinks
    AllowOverride None
</Directory>

<Directory /var/www/>
    Options Indexes FollowSymLinks MultiViews
    AllowOverride None
    Order allow,deny
    allow from all
    AddHandler mod_python .py
    PythonHandler mod_python.publisher
    PythonDebug On
</Directory>

ScriptAlias /cgi-bin/ /var/www/cgi-bin/
<Directory "/var/www/cgi-bin">
    AllowOverride None
    Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
    AddHandler cgi-script cgi pl
    Order allow,deny
    Allow from all
</Directory>

ErrorLog ${APACHE_LOG_DIR}/error.log

# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn

CustomLog ${APACHE_LOG_DIR}/access.log combined

Alias /doc/ "/usr/share/doc/"
<Directory "/usr/share/doc/">
    Options Indexes MultiViews FollowSymLinks
    AllowOverride None
    Order deny,allow
    Deny from all
    Allow from 127.0.0.0/255.0.0.0 ::1/128
</Directory>

#this is your wsgi script described in the prev section
WSGIScriptAlias / /var/www/osqa/osqa.wsgi

CustomLog ${APACHE_LOG_DIR}/osqa.access.log common
ErrorLog ${APACHE_LOG_DIR}/osqa.error.log
    </VirtualHost>

The osqa.wsgi file in /var/www/osqa :

import os
import sys
sys.path.append('/var/www/')
sys.path.append('/var/www/osqa')
# The first part of this module name should be identical to the directory name 
# of the OSQA source.  For instance, if the full path to OSQA is 
# /home/osqa/osqa-server, then the DJANGO_SETTINGS_MODULE should have a value
# of 'osqa-server.settings'.
os.environ['DJANGO_SETTINGS_MODULE'] = 'osqa.settings'
import django.core.handlers.wsgi
application = django.core.handlers.wsgi.WSGIHandler()

I am not quite sure how to modify those files to make askbot work. I installed askbot in /var/www/ask :

$user:/var/www$ ls ask
askbot  __init__.py  log  manage.py  settings.py  urls.py ask.wsgi
urls.py

How to install askbot on Ubuntu with LAMP?

Hi,

I've failed so far to install askbot on Ubuntu 10.10 using Apache and a MySql db. I am currently running OSQA installed by following those instructions : http://wiki.osqa.net/display/docs/Ubuntu+with+Apache+and+MySQL

Here my default configuration file for Apache :

# Must be readable and writable by apache
WSGISocketPrefix ${APACHE_RUN_DIR} 

    <VirtualHost *:80>

    ServerAdmin webmaster@localhost

DocumentRoot /var/www

#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

<Directory />
    Options FollowSymLinks
    AllowOverride None
</Directory>

<Directory /var/www/>
    Options Indexes FollowSymLinks MultiViews
    AllowOverride None
    Order allow,deny
    allow from all
    AddHandler mod_python .py
    PythonHandler mod_python.publisher
    PythonDebug On
</Directory>

ScriptAlias /cgi-bin/ /var/www/cgi-bin/
<Directory "/var/www/cgi-bin">
    AllowOverride None
    Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
    AddHandler cgi-script cgi pl
    Order allow,deny
    Allow from all
</Directory>

ErrorLog ${APACHE_LOG_DIR}/error.log

# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn

CustomLog ${APACHE_LOG_DIR}/access.log combined

Alias /doc/ "/usr/share/doc/"
<Directory "/usr/share/doc/">
    Options Indexes MultiViews FollowSymLinks
    AllowOverride None
    Order deny,allow
    Deny from all
    Allow from 127.0.0.0/255.0.0.0 ::1/128
</Directory>

#this is your wsgi script described in the prev section
WSGIScriptAlias / /var/www/osqa/osqa.wsgi

CustomLog ${APACHE_LOG_DIR}/osqa.access.log common
ErrorLog ${APACHE_LOG_DIR}/osqa.error.log
    </VirtualHost>

The osqa.wsgi file in /var/www/osqa :

import os
import sys
sys.path.append('/var/www/')
sys.path.append('/var/www/osqa')
# The first part of this module name should be identical to the directory name 
# of the OSQA source.  For instance, if the full path to OSQA is 
# /home/osqa/osqa-server, then the DJANGO_SETTINGS_MODULE should have a value
# of 'osqa-server.settings'.
os.environ['DJANGO_SETTINGS_MODULE'] = 'osqa.settings'
import django.core.handlers.wsgi
application = django.core.handlers.wsgi.WSGIHandler()

I am not quite sure how to modify those files to make askbot work. I installed askbot in /var/www/ask /var/www/askbot :

$user:/var/www$ ls ask
askbot
askbot  __init__.py  log  manage.py  settings.py  urls.py
         build        ez_setup.pyc  PKG-INFO   setup.py
askbot.egg-info  ez_setup.py  MANIFEST.in   setup.cfg  temp

How to install askbot on Ubuntu with LAMP?

Hi,

I've failed so far to install askbot on Ubuntu 10.10 using Apache and a MySql db. I am currently running OSQA installed by following those instructions : http://wiki.osqa.net/display/docs/Ubuntu+with+Apache+and+MySQL

Here my default configuration file for Apache :

# Must be readable and writable by apache
WSGISocketPrefix ${APACHE_RUN_DIR} 

    <VirtualHost *:80>

    ServerAdmin webmaster@localhost

DocumentRoot /var/www

#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

<Directory />
    Options FollowSymLinks
    AllowOverride None
</Directory>

<Directory /var/www/>
    Options Indexes FollowSymLinks MultiViews
    AllowOverride None
    Order allow,deny
    allow from all
    AddHandler mod_python .py
    PythonHandler mod_python.publisher
    PythonDebug On
</Directory>

ScriptAlias /cgi-bin/ /var/www/cgi-bin/
<Directory "/var/www/cgi-bin">
    AllowOverride None
    Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
    AddHandler cgi-script cgi pl
    Order allow,deny
    Allow from all
</Directory>

ErrorLog ${APACHE_LOG_DIR}/error.log

# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn

CustomLog ${APACHE_LOG_DIR}/access.log combined

Alias /doc/ "/usr/share/doc/"
<Directory "/usr/share/doc/">
    Options Indexes MultiViews FollowSymLinks
    AllowOverride None
    Order deny,allow
    Deny from all
    Allow from 127.0.0.0/255.0.0.0 ::1/128
</Directory>

#this is your wsgi script described in the prev section
WSGIScriptAlias / /var/www/osqa/osqa.wsgi

CustomLog ${APACHE_LOG_DIR}/osqa.access.log common
ErrorLog ${APACHE_LOG_DIR}/osqa.error.log
    </VirtualHost>

The osqa.wsgi file in /var/www/osqa :

import os
import sys
sys.path.append('/var/www/')
sys.path.append('/var/www/osqa')
# The first part of this module name should be identical to the directory name 
# of the OSQA source.  For instance, if the full path to OSQA is 
# /home/osqa/osqa-server, then the DJANGO_SETTINGS_MODULE should have a value
# of 'osqa-server.settings'.
os.environ['DJANGO_SETTINGS_MODULE'] = 'osqa.settings'
import django.core.handlers.wsgi
application = django.core.handlers.wsgi.WSGIHandler()

I am not quite sure how to modify those files to make askbot work. I installed askbot in /var/www/askbot :

$user:/var/www$ ls askbot
askbot           build        ez_setup.pyc  PKG-INFO   setup.py
askbot.egg-info  ez_setup.py  MANIFEST.in   setup.cfg  temp

How to install askbot on Ubuntu with LAMP?

Hi,

I've failed so far to install askbot on Ubuntu 10.10 using Apache and a MySql db. I am currently running OSQA installed by following those instructions : http://wiki.osqa.net/display/docs/Ubuntu+with+Apache+and+MySQL

Here my default configuration file for Apache :

# Must be readable and writable by apache
WSGISocketPrefix ${APACHE_RUN_DIR} 

    <VirtualHost *:80>

    ServerAdmin webmaster@localhost

DocumentRoot /var/www

#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

<Directory />
    Options FollowSymLinks
    AllowOverride None
</Directory>

<Directory /var/www/>
    Options Indexes FollowSymLinks MultiViews
    AllowOverride None
    Order allow,deny
    allow from all
    AddHandler mod_python .py
    PythonHandler mod_python.publisher
    PythonDebug On
</Directory>

ScriptAlias /cgi-bin/ /var/www/cgi-bin/
<Directory "/var/www/cgi-bin">
    AllowOverride None
    Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
    AddHandler cgi-script cgi pl
    Order allow,deny
    Allow from all
</Directory>

ErrorLog ${APACHE_LOG_DIR}/error.log

# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn

CustomLog ${APACHE_LOG_DIR}/access.log combined

Alias /doc/ "/usr/share/doc/"
<Directory "/usr/share/doc/">
    Options Indexes MultiViews FollowSymLinks
    AllowOverride None
    Order deny,allow
    Deny from all
    Allow from 127.0.0.0/255.0.0.0 ::1/128
</Directory>

#this is your wsgi script described in the prev section
WSGIScriptAlias / /var/www/osqa/osqa.wsgi

CustomLog ${APACHE_LOG_DIR}/osqa.access.log common
ErrorLog ${APACHE_LOG_DIR}/osqa.error.log

The osqa.wsgi file in /var/www/osqa :

import os
import sys
sys.path.append('/var/www/')
sys.path.append('/var/www/osqa')
# The first part of this module name should be identical to the directory name 
# of the OSQA source.  For instance, if the full path to OSQA is 
# /home/osqa/osqa-server, then the DJANGO_SETTINGS_MODULE should have a value
# of 'osqa-server.settings'.
os.environ['DJANGO_SETTINGS_MODULE'] = 'osqa.settings'
import django.core.handlers.wsgi
application = django.core.handlers.wsgi.WSGIHandler()

I am not quite sure how to modify those files to make askbot work. I installed askbot in /var/www/askbot :

:
    $user:/var/www$ ls askbot
 askbot           build        ez_setup.pyc  PKG-INFO   setup.py
 askbot.egg-info  ez_setup.py  MANIFEST.in   setup.cfg  temp
temp