Virtual host, memory usage and versions

Asked by Daniel Bünzli

I now managed to install schooltool from the tarball. Here are a few questions :

1) Being on a shared host I'm unable to specify a virtual host as described in the documentation to install schooltool under a prefix. Is there something I can do about that by adding something in the instance's paste.ini or schooltool.conf ? Basically my host allows me to specify a path (e.g. /schooltool) and it redirects all the traffic through this prefix on the instance. For the time being I was only able to use / as a path, since schooltool doesn't know that it served under a prefix.

2) My host limits my memory usage to 256Mb. Is that enough for a few years and a few hundreds students ?

3) To actually install the whole system from the tarball I had to tweak the [package] section to add all the gradebook, journal and intervention. I ended up with dev versions of these (especially a non-fonctional journal). Under [versions] I constrained all the components to version 2.1.0 and the journal now works. Is there a short and standard procedure to install a given stable release ? I understand schooltool is supposed to be installed via apt-get but for those of us on shared hosting it would be nice to have some kind of standard way to install a stable release (or at least precise instructions) Did I miss something ?

Thanks.

P.S. Other than that, the extensive user manual is very nice and clear.

Question information

Language:
English Edit question
Status:
Answered
For:
SchoolTool Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Justas Sadzevičius (justas.sadzevicius) said :
#1

You could try filling paste.ini with something like this:

[composite:main]
use = egg:Paste#urlmap
/schooltool = schooltool

[app:schooltool]
use = egg:schooltool#main
config_file=schooltool.conf

[server:main]
use = egg:Paste#http
host = 0.0.0.0
port = 80

Revision history for this message
Daniel Bünzli (daniel-buenzli) said :
#2

Thanks, I tried that but the _wsgi server_ responds with a 404 saying that / does not exists (same if I try directly with /calendar).

Besides, nothing shows ups in instance/log/web-access.log. I tried to turn on event logging and dev mode. But it's all very quiet.

Any ideas ?

Daniel

P.S. That's what I tried:

[composite:main]
use = egg:Paste#urlmap
/fp/schooltool = schooltool

[app:schooltool]
use = egg:schooltool#main
config_file=schooltool.conf

[server:main]
use = egg:Paste#http
host = 127.0.0.1
port = 25910

Revision history for this message
Justas Sadzevičius (justas.sadzevicius) said :
#3

Try looking at 127.0.0.1/fp/schooltool/calendar

This url map does not specify what lies under /, so you'll get 404. But /fp/schooltool should work fine.

Also, 127.0.0.1 does not look right... Shouldn't it be 0.0.0.0? http://book.schooltool.org/remote.html

Revision history for this message
Daniel Bünzli (daniel-buenzli) said :
#4

Le jeudi, 19 juillet 2012 à 16:11, Justas Sadzevičius a écrit :

> This url map does not specify what lies under /, so you'll get 404. But
> /fp/schooltool should work fine.
>
> Also, 127.0.0.1 does not look right... Shouldn't it be 0.0.0.0?
No, to explain, my shared host tells me to serve my app on localhost on a port it assigns me. He then routes all the traffic on my domain for a given prefix, for example.org/fp/schooltool/*, there.

To sum up. If I try to use the regular paste.ini with the following :

[app:main]
use = egg:schooltool#main
config_file=schooltool.conf

[server:main]
use = egg:Paste#http
host = 127.0.0.1
port = 25910

This works perfectly fine but I'm only able to access schooltool from the root of my domain name, example.org/. If I try to specify the same setup, that is access via example.org/ but via urlmap :

[composite:main]
use = egg:Paste#urlmap
/ = schooltool

[app:schooltool]
use = egg:schooltool#main
config_file=schooltool.conf

[server:main]
use = egg:Paste#http
host = 127.0.0.1
port = 25910

This also work. But as soon as in [composite:main] I try a different path from / I get this html

> curl http://example.org/fp/schooltool
<html>
<head><title>Not Found</title></head>
<body>
<h1>Not Found</h1>
<p>The resource could not be found.
<br/>/
<!-- defined apps: (None, '/fp/schooltool')
SCRIPT_NAME: ''
PATH_INFO: '/'
HTTP_HOST: 'example.org' --></p>
<hr noshade>
<div align="right">WSGI Server</div>
</body>
</html>

Best,

Daniel

Revision history for this message
Daniel Bünzli (daniel-buenzli) said :
#5

Le jeudi, 19 juillet 2012 à 16:56, Daniel Bünzli a écrit :

> > curl http://example.org/fp/schooltool
>
> <html>
> <head><title>Not Found</title></head>
> <body>
> <h1>Not Found</h1>
> <p>The resource could not be found.
> <br/>/
> <!-- defined apps: (None, '/fp/schooltool')
> SCRIPT_NAME: ''
> PATH_INFO: '/'
> HTTP_HOST: 'example.org (http://example.org)' --></p>
> <hr noshade>
> <div align="right">WSGI Server</div>
> </body>
> </html>

I think the problem must be that the my shared host doesn't seem to setup a correct PATH_INFO when it does its URL routing. I didn't find anyway to override that from the config files, is there any ? Otherwise the question may be closed.

Best,

Daniel

Revision history for this message
Launchpad Janitor (janitor) said :
#6

This question was expired because it remained in the 'Open' state without activity for the last 15 days.

Revision history for this message
Gediminas Paulauskas (menesis) said :
#7

Pinning all versions to 2.1.0 is a good solution.

A good way to get a compatible set of stable versions is to change one of base.cfg file from flourish to 2.1, which is the last stable version

[buildout]
extends = http://ftp.schooltool.org/schooltool/2.1/versions.cfg
versions = versions
find-links =
    http://ftp.schooltool.org/schooltool/2.1/

There is an alternative way to get all the modules, https://launchpad.net/schooltool.release. Checkout the stable version of this umbrella project

$ bzr branch lp:schooltool.release/2.1 schooltool
$ cd schooltool
$ make
# schooltool modules and dependencies will be downloaded as tarballs
$ make run

There is no tarball of schooltool.release. Should make one...

Can you help with this problem?

Provide an answer of your own, or ask Daniel Bünzli for more information if necessary.

To post a message you must log in.