running schooltool on port 80

Bug #259415 reported by Tom Hoffman
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
SchoolTool
Fix Released
High
Gediminas Paulauskas

Bug Description

Using the Debian/Ubuntu packages and init script, you cannot simply switch SchoolTool to port 80 using paste.ini, because the process doesn't start with sufficient privileges.

We either need to make this easy or provide instructions for the necessary manual changes.

Tags: deployment
Changed in schooltool:
assignee: nobody → jinty
importance: Undecided → High
milestone: none → intrepid
status: New → Confirmed
Changed in schooltool:
assignee: jinty → menesis
Changed in schooltool:
milestone: intrepid → none
Changed in schooltool:
assignee: Gediminas Paulauskas (menesis) → Jason Straw (jasonstraw)
Changed in schooltool:
assignee: Jason Straw (jasonstraw) → Gediminas Paulauskas (menesis)
tags: added: release tagged-badly
tags: added: deployment
removed: release tagged-badly
Changed in schooltool:
importance: High → Critical
milestone: none → next
Changed in schooltool:
importance: Critical → Medium
status: Confirmed → Triaged
Revision history for this message
Gediminas Paulauskas (menesis) wrote :

Running on port 80 is not advisable. Instead,

1) Serve through Apache's mod_rewrite. Add

    RewriteEngine on
    RewriteRule ^/(.*) http://localhost:7080/++vh++http:example.org:80/++/$1 [P]

to a virtual host definition in sites-enabled.

2) configure the router to redirect, e.g. example.org:80 to 10.0.0.2:7080

Document both options in http://book.schooltool.org/htmlhelp/remote.html

Revision history for this message
Gediminas Paulauskas (menesis) wrote :

Add this line to /etc/hosts

127.0.0.1 schooltool.local

Install apache2

Copy the attached file to /etc/apache2/sites-available/schooltool.local

$ sudo a2ensite schooltool.local
$ sudo apache2ctl graceful

Go to http://schooltool.local

Revision history for this message
Tom Hoffman (tom-hoffman) wrote :

Can we make a package that does this?

Revision history for this message
Justas Sadzevičius (justas.sadzevicius) wrote :

A rewrite rule for http://localhost/schooltool would also be nice. And maybe externally reachable http://xxx.xxx.xxx.xxx/schooltool

Changed in schooltool:
milestone: next → 2.1
Revision history for this message
Gediminas Paulauskas (menesis) wrote :

I tried the rewrite rule above, and it didn't work. Turns out the needed apache modules are not enabled by default.

  $ sudo a2enmod proxy_http rewrite

Tom: yes, I am writing all this to a book page and an example file to be installed at /usr/share/doc/schooltool/examples or so.

Changed in schooltool:
status: Triaged → In Progress
importance: Medium → High
Revision history for this message
Gediminas Paulauskas (menesis) wrote :

Looked at http://cando.cteresource.org/phase2install.html, rewritten to use apache ProxyPass directive instead of RewriteRule, and added to schooltool's README.txt and http://book.schooltool.org/apache.html

Changed in schooltool:
milestone: 2.1 → 2.0.1
status: In Progress → Fix Committed
Revision history for this message
Gediminas Paulauskas (menesis) wrote :
Changed in schooltool:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.