HowTO: ServerName globally Topic is solved

Questions regarding the Web Server
Apache + Nginx, Nginx + PHP5-FPM
BBuchanan1013
Posts: 139
Joined: Thu Jan 07, 2016 12:01 am

HowTO: ServerName globally  Topic is solved

Postby BBuchanan1013 » Thu Sep 29, 2016 6:15 am

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

joem
Posts: 373
Joined: Thu Nov 13, 2014 8:33 am
Location: New York
Contact:

Re: HowTO: ServerName globally

Postby joem » Fri Jan 20, 2017 11:43 am

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

BBuchanan1013
Posts: 139
Joined: Thu Jan 07, 2016 12:01 am

Re: HowTO: ServerName globally

Postby BBuchanan1013 » Sun May 14, 2017 2:37 pm

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.

mariad
Posts: 28
Joined: Fri Feb 17, 2017 5:34 am

Re: HowTO: ServerName globally

Postby mariad » Fri Jun 16, 2017 11:53 am

Welcome to the community, hope you got what you wanted.


Return to “Web Server”



Who is online

Users browsing this forum: No registered users and 10 guests

cron