New Pi user here - I popped it out of the box and immediately went to work trying to turn it into a web server. I managed to install Apache, PHP5 and MySQL5 no problem. I can SSH in without issue.

However, Apache doesn't seem to want to start. I get this error:

$ /etc/init.d/apache2 start
[....] Starting web server: apache2/usr/sbin/apache2ctl: 87: ulimit: error setting limit (Operation not permitted)

apache2: apr_sockaddr_info_get() failed for memlbiometric

apache2: Could not reliably determine the server's fully qualified domain name, using for ServerName

(13)Permission denied: make_sock: could not bind to address

no listening sockets available, shutting down

Unable to open logs
Action 'start' failed.

The Apache error log may have more information.


I have to admit, I'm a little flummoxed. Whats the issue here?

  • Did you try running the command as a superuser (sudo)? – syb0rg Jul 30 '13 at 1:18
  • 1
    Yeah. I think the issue had to with an inability to resolve the hostname, which had an underscore in it. It then wrought all kinds of havoc. I flashed the card and started over, I'll let you know how it looks. – user8741 Jul 30 '13 at 2:15
  • Here's a tutorial to guide you along your way – syb0rg Jul 30 '13 at 2:19
  • Did you upgrade the firmware and the OS to the latest? – Piotr Kula Aug 8 '13 at 19:06
$ /etc/init.d/apache2 start

is deprecated, you should use new interface for starting services:

$ sudo service apache2 start
| improve this answer | |

Based on the description you gave in your question, I don't believe you performed the full setup process. From the tutorial I linked in my comment:

A little Debian/Apache foreknowledge: The default Debian install of Apache will be configured to run in the "www-data" user space, and use the "www-data" group. The version of Debian used for this guide (debian6-19-04-2012) already includes the "www-data" user, but not the "www-data" group. The following commands will create the "www-data" group, and add the "www-data" user to the newly-created group:

# Create the www-data group
sudo addgroup www-data
sudo adduser www-data www-data

A touch more Debian/Apache foreknowledge: The default Debian install of Apache will be configured to serve HTML pages from the "/var/www" folder. While this folder is created during the Apache2 install process, it will likely be created with the wrong owner:group (root:root). We can ensure a smoother install and successful running of Apache2 by creating this folder ahead of time and changing owner:group to www-data:www-data.

# Create the /var/www folder and reassign ownership of the folder (and any files/subfolders)
sudo mkdir /var/www
sudo chown -R www-data:www-data /var/www
| improve this answer | |

The issue is that apache couldn't listen on port 80
(13)Permission denied: make_sock: could not bind to address
That's because you didn't run /etc/init.d/apache2 start as root.

If you run it as root, it should be able to start fine. Apache being unable to resolve a FQDN will not stop it from starting.

| improve this answer | |
  • Not to demean this answer, but I don't see how this got upvoted after I suggested the same thing to the OP in the comments 4 hours earlier. It didn't work -1. – syb0rg Jul 30 '13 at 17:24
  • Perhaps the people who upvoted felt I had provided more information ? I'm not sure why I got upvoted. However I don't really see how the OP could have run it as root and still had the same issue. The issue originally was that port 80 couldn't be accessed. Running as root would solve that. As the OP did not provide an updated error message, I assumed that he didn't actually run it as root. – Lawrence Jul 31 '13 at 1:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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