PDA

View Full Version : running apache2 as root


Snargle
November 22nd, 2005, 04:38 PM
I remember hearing somewhere that it's a bad idea to run Apache as root, but I don't know of any way around it in ubuntu.

I get this error:

zach@zm:~$ apache2
(13)Permission denied: make_sock: could not bind to address [::]:80
no listening sockets available, shutting down
Unable to open logs


Is there a simple solution to this, and if so, why isn't it in the Breezy starter guide?

Thanks

LordHunter317
November 22nd, 2005, 05:27 PM
You have to start Apache as root. That doesn't mean Apache is running as root.

paddyg
November 22nd, 2005, 05:34 PM
...as files are served by unprivileged child processes (www-data)

s0c0
November 23rd, 2005, 09:39 PM
Yes in ubuntu you have to use the sudo command and then start apache. The apache config file defaults to www-data as the user/group and in most cases it should be left this way.