I'm looking to retrieve the ServerName
field located in /etc/apache2/apache2.conf
. My only issue is then calling it in PHP (echo $_SERVER['SERVER_NAME'];
) it gives me not the server name but the ip address.
If I pull a phpinfo();
I can the server name under the Hostname:Port
field under the apache2handler, so I know it's accessible somehow.