Page 1 of 1

HowTO: ServerName globally  Topic is solved

Posted: Thu Sep 29, 2016 6:15 am
by BBuchanan1013
For those that have ubuntu + apache and get the wonderful warning:

Code: Select all

AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using (your hostname). Set the 'ServerName' directive globally to suppress this message


What I did was to create a global file to suppress it instead of trying to determine the actual file that directive was in.

Code: Select all

nano /etc/apache2/conf.d/fqdn.conf


Set the servername to yours replacing localhost

Code: Select all

ServerName localhost


Ctrl + x
y
enter
restart apache

Re: HowTO: ServerName globally

Posted: Fri Jan 20, 2017 11:43 am
by joem
BBuchanan1013 wrote:For those that have ubuntu + apache and get the wonderful warning:

Code: Select all

AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using (your hostname). Set the 'ServerName' directive globally to suppress this message


What I did was to create a global file to suppress it instead of trying to determine the actual file that directive was in.

Code: Select all

nano /etc/apache2/conf.d/fqdn.conf


Set the servername to yours replacing localhost

Code: Select all

ServerName localhost


Ctrl + x
y
enter
restart apache


This issue also happens in centos7 the location is different though /etc/httpd/conf.d/fqdn.conf. @BBuchanan1013 did you make a pull request for this?

Centos7

Code: Select all

echo "ServerName localhost" >> /etc/httpd/conf.d/fqdn.conf

Re: HowTO: ServerName globally

Posted: Sun May 14, 2017 2:37 pm
by BBuchanan1013
joem wrote:
BBuchanan1013 wrote:For those that have ubuntu + apache and get the wonderful warning:

Code: Select all

AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using (your hostname). Set the 'ServerName' directive globally to suppress this message


What I did was to create a global file to suppress it instead of trying to determine the actual file that directive was in.

Code: Select all

nano /etc/apache2/conf.d/fqdn.conf


Set the servername to yours replacing localhost

Code: Select all

ServerName localhost


Ctrl + x
y
enter
restart apache


This issue also happens in centos7 the location is different though /etc/httpd/conf.d/fqdn.conf. @BBuchanan1013 did you make a pull request for this?

Centos7

Code: Select all

echo "ServerName localhost" >> /etc/httpd/conf.d/fqdn.conf


Your right, I see instead of apache2;

Code: Select all

/etc/httpd/conf.d/


otherwise the rest should work. Any .conf in the conf.d folder will be picked up by apache when it starts.

Re: HowTO: ServerName globally

Posted: Fri Jun 16, 2017 11:53 am
by mariad
Welcome to the community, hope you got what you wanted.