Apache2 errors on DreamCompute


#1

I have a new DreamCompute instance. It works. Default user = ubuntu. Instance name = mycloud. My first install was Apache 2. It works, also. But, I get unexpected errors journaled when I start, stop, or restart Apache2. Why is this happening? See following journal log:

ubuntu@mycloud:~$ sudo systemctl stop apache2
sudo: unable to resolve host mycloud
ubuntu@mycloud:~$ journalctl -u apache2
– Logs begin at Sat 2018-03-17 03:22:17 UTC, end at Sun 2018-03-18 04:07:33 UTC. –
Mar 18 03:30:54 mycloud systemd[1]: Starting LSB: Apache2 web server…
Mar 18 03:30:54 mycloud apache2[16396]: * Starting Apache httpd web server apache2
Mar 18 03:30:54 mycloud apache2[16396]: AH00557: apache2: apr_sockaddr_info_get() failed for mycloud
Mar 18 03:30:54 mycloud apache2[16396]: AH00558: apache2: Could not reliably determine the server’s fully qualified domain name, using 127.0.0.1. Set the 'ServerNam
Mar 18 03:30:55 mycloud apache2[16396]: *
Mar 18 03:30:55 mycloud systemd[1]: Started LSB: Apache2 web server.
Mar 18 04:03:58 mycloud systemd[1]: Stopping LSB: Apache2 web server…
Mar 18 04:03:58 mycloud apache2[16662]: * Stopping Apache httpd web server apache2
Mar 18 04:03:59 mycloud apache2[16662]: *
Mar 18 04:03:59 mycloud systemd[1]: Stopped LSB: Apache2 web server.
Mar 18 04:05:14 mycloud systemd[1]: Stopped LSB: Apache2 web server.
Mar 18 04:05:14 mycloud systemd[1]: Starting LSB: Apache2 web server…
Mar 18 04:05:14 mycloud apache2[16695]: * Starting Apache httpd web server apache2
Mar 18 04:05:14 mycloud apache2[16695]: AH00557: apache2: apr_sockaddr_info_get() failed for mycloud
Mar 18 04:05:14 mycloud apache2[16695]: AH00558: apache2: Could not reliably determine the server’s fully qualified domain name, using 127.0.0.1. Set the 'ServerNam
Mar 18 04:05:15 mycloud apache2[16695]: *
Mar 18 04:05:15 mycloud systemd[1]: Started LSB: Apache2 web server.
Mar 18 04:07:17 mycloud systemd[1]: Stopping LSB: Apache2 web server…
Mar 18 04:07:17 mycloud apache2[16778]: * Stopping Apache httpd web server apache2
Mar 18 04:07:18 mycloud apache2[16778]: *
lines 1-21


#2

The full message that you cut off there says:

Set the 'ServerName' directive globally to suppress this message

So in /etc/apache2/apache2.conf, add:

ServerName localhost

Then in individual foo.tld.conf files, check the following:

<VirtualHost *:80>
   ...
    ServerName foo.tld
    ServerAlias www.foo.tld
   ...
</VirtualHost>

Then restart the apache service.

Good luck with this adventure, I’m not too far ahead of you on this path. :wink:


#3

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.