Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've just installed lighttpd on Mac OS 10.6, but:

$ lighttpd -f lighttpd.conf -D
2011-10-05 19:01:32: (network.c.358) can't bind to port:  80 Permission denied 
$ lsof -i :80
[a ton of processes]

How can I start lighttpd on a different port?

share|improve this question
comment doesn't accept formatting, I'm cutting and attaching as answer for the sake of readability – anddam Mar 2 '12 at 7:33
up vote 2 down vote accepted

2 options:

  1. put something like this into your lighttpd.conf:

    server.port = 8000
  2. launch lighttpd with admin-rights via sudo:

    $> sudo lighttpd -f lighttpd.conf -D

Also read the lighthttpd configuration tutorial.

share|improve this answer

You've already been answered about how to set a specific port but there are still two points to be highlighted in your question:

  1. as regular user you cannot bind TCP/IP ports below 1024, a common threshold for system services, hence the permission denied error
  2. the ton of processes come from listing your user's outgoing connection (probably web browsing); filter listening and privileged port instead:

    sudo lsof -i :80 | grep LISTEN

The first point may eliminate the need to change default port, since it seems you wanted to change it in order to avoid the permission error.

On OS X ensure system's httpd is off when trying to start your own webserver, it's set with System Preferences -> Sharing -> Web Sharing checkbutton.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.