1

Trying to bind apache2 to localhost only, running Ubuntu 12.04.3 LTS on OpenVZ VPS. It fails on me (see /var/log/apache2/error.log). Default configuration is:

# cat /etc/hosts fe00::0 ip6-localnet ff00::0 ip6-mcastprefix ff02::1 ip6-allnodes ff02::2 ip6-allrouters 127.0.0.1 localhost.localdomain localhost # Auto-generated hostname. Please do not remove this comment. <some-ext-ipv6-address> <some-hostname> ::1 localhost ip6-localhost ip6-loopback # netstat -lntup tcp6 0 0 :::80 :::* LISTEN 623/apache2 

I change Listen 80 to Listen 172.0.0.1:80 in /etc/apache2/ports.conf.

Apache2 errors out. There is no other service listening on port 80, also there is no other (conflicting) Listen declaration, just the default ports.conf apache2 ships with + the single change described.

# cat /var/log/apache2/error.log apache2: Could not reliably determine the server's fully qualified domain name, using <some-ext-ipv6-address> for ServerName (99)Cannot assign requested address: make_sock: could not bind to address 172.0.0.1:80 no listening sockets available, shutting down Unable to open logs 

1 Answer 1

0

localhost address is 127.0.0.1 not 172.0.0.1

1
  • 1
    omg, what a silly mistake. thanks, works perfect! back to preschool then. Commented Oct 5, 2013 at 11:41

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.