welcome: please sign in

Diff for "RunningYourOwnApache"

Differences between revisions 1 and 2
Revision 1 as of 2008-05-24 11:22:50
Size: 2443
Editor: BenjaminHell
Comment:
Revision 2 as of 2008-05-25 13:31:08
Size: 2293
Editor: AdamChlipala
Comment: Fix port request description
Deletions are marked like this. Additions are marked like this.
Line 9: Line 9:
== Apache setup and startup == = Apache setup and startup =
Line 20: Line 20:
=== Port issues ===
Your httpd must be configured so that it
listens on a dedicated port, the standard port 80 won't work. There
used to be a hcoop procedure to get access to a free port.
== Port issues ==
Your httpd must be configured so that it listens on a dedicated port.  The standard port 80 won't work.
Line 25: Line 23:
Right. On Fyodor, we used to have a firewall setup where it was
necessary to request a port for yourself so you can bind to it.

We *currently* do not have this restriction on Mire, but plans for
re-using the same firewall setup we had are underway.

So please use the Members Portal to submit a Port request on page
https://members.hcoop.net/portal/ip , so that when we enable the
firewall and binding restrictions, we automatically leave the
ports open for you.
We currently have no restriction on which users can listen on which ports above 1024, but we plan to implement a firewall soon, similar to what we had on our old server fyodor. So please submit a firewall rule request on [https://members.hcoop.net/portal/sec the portal's security settings page], so that when we enable the firewall and binding restrictions, we know to leave the ports open for you.
Line 42: Line 31:
=== mod_python specials === == mod_python specials ==
Line 53: Line 42:
== domtool config == = domtool config =
Line 63: Line 52:
   web "www" with   web "www" with
Line 72: Line 61:
== AFS problem == = AFS problem =

This page describes how to run your own apache HTTP daemon, for example if you have special needs regarding apache modules etc.

TableOfContents

I have an apache instance with mod_python running for http://www.siebengang.net/ .

1. Apache setup and startup

Get a working apache/mod_python installation (in your home dir), and set up a startup procedure, so that cron starts your daemon when mire reboots. Take a cron job like

@reboot   run-in-pagsh --fg ~/apache2/bin/apachectl start

as a starting point.

1.1. Port issues

Your httpd must be configured so that it listens on a dedicated port. The standard port 80 won't work.

We currently have no restriction on which users can listen on which ports above 1024, but we plan to implement a firewall soon, similar to what we had on our old server fyodor. So please submit a firewall rule request on [https://members.hcoop.net/portal/sec the portal's security settings page], so that when we enable the firewall and binding restrictions, we know to leave the ports open for you.

I got 8880 (and 8881 for another httpd) and have this in my httpd.conf:

Listen 8880

1.2. mod_python specials

I just discovered the following lines in my httpd.conf, too. I think they are necessary for mod_python to function properly (my mod_python and some more modules are installed in ~/python/mod_python):

<IfModule mod_python.c>
    PythonPath "sys.path + ['/afs/hcoop.net/user/b/be/beni/python']"
</IfModule

2. domtool config

Next you need "port forwarding" of http requests for your domain to your own httpd (so that you don't need to use addresses like http://www.siebengang.net:8880/index.html, but http://www.siebengang.net/index.html gets "mapped" to port 8880). In the domtool setup for me this looks like

domain "siebengang.net" with
  (* NS/DNS/Mail stuff omitted *)
  web "www" with
    proxyPass "/" "http://localhost:8880/";
    proxyPassReverse "/" "http://localhost:8880/";
  end;
end;

That should be about all you need...

3. AFS problem

You may be interested in an AFS related problem I have encountered and not been able to solve yet: https://bugzilla.hcoop.net/show_bug.cgi?id=291

RunningYourOwnApache (last edited 2013-01-14 07:25:26 by ClintonEbadi)