HowTO: ServerName globally
-
- Posts: 139
- Joined: Thu Jan 07, 2016 12:01 am
HowTO: ServerName globally
For those that have ubuntu + apache and get the wonderful warning:
What I did was to create a global file to suppress it instead of trying to determine the actual file that directive was in.
Set the servername to yours replacing localhost
Ctrl + x
y
enter
restart apache
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
Code: Select all
nano /etc/apache2/conf.d/fqdn.conf
Code: Select all
ServerName localhost
y
enter
restart apache
Re: HowTO: ServerName globally
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?BBuchanan1013 wrote:For those that have ubuntu + apache and get the wonderful warning:
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
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
Set the servername to yours replacing localhostCode: Select all
nano /etc/apache2/conf.d/fqdn.conf
Ctrl + xCode: Select all
ServerName localhost
y
enter
restart apache
Centos7
Code: Select all
echo "ServerName localhost" >> /etc/httpd/conf.d/fqdn.conf
-
- Posts: 139
- Joined: Thu Jan 07, 2016 12:01 am
Re: HowTO: ServerName globally
Your right, I see instead of apache2;joem wrote: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?BBuchanan1013 wrote:For those that have ubuntu + apache and get the wonderful warning:
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
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
Set the servername to yours replacing localhostCode: Select all
nano /etc/apache2/conf.d/fqdn.conf
Ctrl + xCode: Select all
ServerName localhost
y
enter
restart apache
Centos7Code: Select all
echo "ServerName localhost" >> /etc/httpd/conf.d/fqdn.conf
Code: Select all
/etc/httpd/conf.d/
Re: HowTO: ServerName globally
In CentOS7 you can use hostnamectl