Getting (EAI 2)Name or service not known when running apachectl configtest

Latest response

Hello,

I'm getting the following warning when running apachectl configtest :

# apachectl configtest
[Mon Oct 17 15:09:30.404170 2016] [core:error] [pid 2326] (EAI 2)Name or service not known: AH00547: Could not resolve host name hostname.example.com:80: -- ignoring!
Syntax OK

I do not understand why the hostname could not be resolved. Resolving the hostname via nslookup works fine. My VirtualHost configuration looks like this:

<VirtualHost hostname.example.com:80:>
    DocumentRoot /var/www/htdocs/cgit
    ServerName hostname.example.com

    ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
    <Directory "/home/git/repositories">
            AllowOverride None
            Options +ExecCGI
            DirectoryIndex /cgi-bin/cgit.cgi
            Order allow,deny
            Allow from all
    </Directory>

    <Directory "/var/www/htdocs/cgit">
         AllowOverride None
         Options +ExecCGI
         Order deny,allow
         Allow from all
    </Directory>
</VirtualHost>

Does someone have any idea what I did wrong here?

Regards,
Joerg K.

Responses