Pages: [1]
  Print  
Author Topic: Bongo & Apache setup on Ubuntu  (Read 7142 times)
Tux
Newbie
*

Karma: 0
Offline Offline

Posts: 7


View Profile
« on: April 19, 2008, 08:41:01 PM »

I have installed a working copy of bongo on a ubuntu gutsy server but I am having problems using Bongo and Apache2.

I am able to get onto bongo using the standalone server but how do I setup bongo with apache as a virtual host? I followed the guide and edited the apache2.conf with

Code:
<IfModule mod_python.c>
# Note that you cannot change the webroot to be anything other than /
# at the moment - otherwise, it will not work!
Alias / $prefix/share/bongo/htdocs/

<Location />
    Order allow,deny
    Allow from all
    Options +FollowSymlinks
</Location>

<Location /user>
    Order allow,deny
    Allow from all

    SetHandler python-program
    PythonPath "['$prefix/lib/python2.4/site-packages']+sys.path"
    PythonHandler bongo.dragonfly.Server
    PythonOption DragonflyUriRoot "/user"
    PythonDebug On
</Location>

<Location /admin>
    Order allow,deny
    Allow from all

    SetHandler python-program
    PythonPath "['$prefix/lib/python2.4/site-packages']+sys.path"
    PythonHandler bongo.hawkeye.Server
    PythonOption HawkeyeUriRoot "/admin"
    PythonOption HawkeyeTmplRoot "$prefix/share/bongo/htdocs/hawkeye"
    PythonDebug On
</Location>
</IfModule>

replacing $prefix with /usr and apache restarts fine.
Logged
so_solid_moo
Newbie
*

Karma: 0
Offline Offline

Posts: 25


View Profile
« Reply #1 on: April 20, 2008, 03:33:31 AM »

You said it didn't work, but you didn't say in what way Smiley

What are you doing, what are you expecting to see, and what is different to those expectations?
Logged
Tux
Newbie
*

Karma: 0
Offline Offline

Posts: 7


View Profile
« Reply #2 on: April 20, 2008, 06:40:31 AM »

You said it didn't work, but you didn't say in what way Smiley

What are you doing, what are you expecting to see, and what is different to those expectations?

I'd like to be able to assign a domain name to bongo like a virtual host so when someone types in the address it will go to bongo. At the moment when I go to any url pointed to the server it directs it to the default virtual host.

For example I'd like to assign bongo.mywebsite.com to bongo and mywebsite.com to my website.
Logged
so_solid_moo
Newbie
*

Karma: 0
Offline Offline

Posts: 25


View Profile
« Reply #3 on: April 20, 2008, 08:20:20 AM »

You probably want to read a guide for configuring Apache, like http://www.debian-administration.org/articles/412 .

The exact configuration can depend on what else you've got running in Apache, but usually a virtual host configuration of the standard config we ship plus a ServerName is enough, so long as it's in the right place and enabled in Apache.
Logged
Tux
Newbie
*

Karma: 0
Offline Offline

Posts: 7


View Profile
« Reply #4 on: April 20, 2008, 09:16:16 AM »

You probably want to read a guide for configuring Apache, like http://www.debian-administration.org/articles/412 .

The exact configuration can depend on what else you've got running in Apache, but usually a virtual host configuration of the standard config we ship plus a ServerName is enough, so long as it's in the right place and enabled in Apache.

If I get what you saying is that I can create a virtual host entry for bongo using the normal virutal host files? If this is so where do I point the document root?
Logged
Tux
Newbie
*

Karma: 0
Offline Offline

Posts: 7


View Profile
« Reply #5 on: April 20, 2008, 09:26:51 AM »

I figured it out!

I created a new virtual host entry with the document root as:
Code:
$prefix/share/bongo/htdocs/

where $prefix is the base directory where bongo was installed. So in ubuntu installed from the repo it would be:
Code:
/usr/share/bongo/htdocs/

and my virtual host entry looks like this:
Code:
NameVirtualHost *
<VirtualHost *>
ServerAdmin admin@myhost.com

ServerName myhost.com
ServerAlias www.myhost.com *.myhost.com

DocumentRoot /usr/share/bongo/htdocs/
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /usr/share/bongo/htdocs/>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
# This directive allows us to have apache2's default start page
                # in /apache2-default/, but still have / go to the right place
                #RedirectMatch ^/$ /apache2-default/
</Directory>

ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>

ErrorLog /var/log/apache2/myhost.com-error.log

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

CustomLog /var/log/apache2/myhost.com-access.log combined
ServerSignature On

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

</VirtualHost>

replace myhost.com with domain address.

Thanks to all who replied.
Logged
Tux
Newbie
*

Karma: 0
Offline Offline

Posts: 7


View Profile
« Reply #6 on: April 20, 2008, 09:46:30 AM »

Ok my attempt was short lived. I'm getting problems with log in for users and admins.

Logs suggest that the /user and /admin/login structure does not exists within the /usr/share/bongo/htdocs

It does load the index.html which is the user login page.
Logged
Tux
Newbie
*

Karma: 0
Offline Offline

Posts: 7


View Profile
« Reply #7 on: April 20, 2008, 10:01:01 AM »

When I try to login I get the error message:
Quote
Some error occured while logging in - check the logs.

I have a feeling it's something to do with my apache config. In the configuration tutorial on bongo for apache it says:

Code:
PythonPath "['$prefix/lib/python2.4/site-packages']+sys.path"
I modified it to:
Code:
PythonPath "['/usr/lib/python2.4/site-packages']+sys.path"
Am I suppose to replace the "[]" brackets as well as replace the "+sys.path" with something else?
Logged
so_solid_moo
Newbie
*

Karma: 0
Offline Offline

Posts: 25


View Profile
« Reply #8 on: April 20, 2008, 11:02:15 AM »

No, those bits are fine.

It sounds like you don't have mod_python either installed or activated - that's why you'd get 404s on /user/
Logged
Tux
Newbie
*

Karma: 0
Offline Offline

Posts: 7


View Profile
« Reply #9 on: April 20, 2008, 12:33:59 PM »

No, those bits are fine.

It sounds like you don't have mod_python either installed or activated - that's why you'd get 404s on /user/
-----------------------------------------------------------
Thanks you! It turns out mod_python wasn't installed so I fixed that but I'm getting another error 404:
Code:
login error: MochiKit.Async.XMLHttpRequestError: Request failed: HTTP Error: 404/ (http://bong.mine.nu/js/lib/MochiKit/Base.js:1077
and in the apache log it still can't find $bongo/htdocs/user directory.
Logged
webpatella
Newbie
*

Karma: 0
Offline Offline

Posts: 5


View Profile
« Reply #10 on: June 18, 2009, 07:37:48 AM »

someone can tell me the correct ubuntu repository?
Logged
LanceHaig
Jr. Member
**

Karma: 0
Offline Offline

Posts: 50


View Profile WWW
« Reply #11 on: June 18, 2009, 08:20:59 AM »

hey Webpatella,

I don't think that the packages have been created for ubuntu yet.

Thanks

Lance
Logged
webpatella
Newbie
*

Karma: 0
Offline Offline

Posts: 5


View Profile
« Reply #12 on: June 19, 2009, 06:23:23 AM »

ok but in the documentation for gutsy based installation there is a wrong repository!

deb http://compsoc.dur.ac.uk/~jdl/bongo-0.3/gutsy ./

get me 404 error!!
Logged
LanceHaig
Jr. Member
**

Karma: 0
Offline Offline

Posts: 50


View Profile WWW
« Reply #13 on: June 19, 2009, 06:35:06 AM »

Hi Webpatella,

I will get the site changes asap.

Thanks

Lance
Logged
Pages: [1]
  Print  
 
Jump to: