Can loggerhed be configured to run on port 80?

Asked by jrenbaum on 2010-01-15

We run loggerhead using serve-branches and have a loggerheadd init file under /etc/init.d that works fine.

However, attempting to change the port that loggerhead uses from 8080 to 80 to make it easier to hit an alias url does not work. Loggerhead comes back with *not listening on port 8080*. If we use port 80 all is well. Am I missing something or does loggerhead simply not support running on port 80?

Jay

Question information

Language:
English Edit question
Status:
Solved
For:
loggerhead Edit question
Assignee:
No assignee Edit question
Solved by:
Michael Hudson-Doyle
Solved:
2010-01-18
Last query:
2010-01-18
Last reply:
2010-01-18
Martin Pool (mbp) said : #1

> Loggerhead comes back with *not listening on port 8080*.

> If we use port 80 all is well.

I assume you mean port 8080?

I think what you are hitting here is that port 80 can only be bound by processes running as root. Most web servers have a feature to bind the port then change to another user, but I don't think loggerhead can do this yet. I would not recommend running all of loggerhead as root.

There are a few options:
 * use an external program to forward port 80 to localhost:8080 (netcat can do this I think)
 * run loggerhead underneath another web server

hth

jrenbaum wrote:
> New question #97561 on loggerhead:
> https://answers.launchpad.net/loggerhead/+question/97561
>
> We run loggerhead using serve-branches and have a loggerheadd init file under /etc/init.d that works fine.
>
> However, attempting to change the port that loggerhead uses from 8080 to 80 to make it easier to hit an alias url does not work. Loggerhead comes back with *not listening on port 8080*. If we use port 80 all is well. Am I missing something or does loggerhead simply not support running on port 80?

You'll need to run it as root (which I wouldn't recommend) or use
authbind to allow it to bind to port 80, but otherwise it should be fine.

Cheers,
mwh

jrenbaum (jrenbaum) said : #3

Thanks Michael Hudson, that solved my question.