Vesta Control Panel - Forum

Community Forum

Skip to content

Advanced search
  • Quick links
    • Main site
    • Github repo
    • Google Search
  • FAQ
  • Login
  • Register
  • Board index Main Section Web Server
  • Search

HowTO: ServerName globally

Questions regarding the Web Server
Apache + Nginx, Nginx + PHP5-FPM
Post Reply
  • Print view
Advanced search
4 posts • Page 1 of 1
BBuchanan1013
Posts: 139
Joined: Thu Jan 07, 2016 12:01 am

HowTO: ServerName globally
  • Quote

Post by 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
Top

joem
Posts: 378
Joined: Thu Nov 13, 2014 8:33 am

Os: CentOS 6x
Web: nginx + php-fpm
Re: HowTO: ServerName globally
  • Quote

Post by 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
Top

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

Re: HowTO: ServerName globally
  • Quote

Post by 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.
Top

usr999
Posts: 78
Joined: Sat Jul 25, 2015 3:37 pm

Re: HowTO: ServerName globally
  • Quote

Post by usr999 » Sun Jun 10, 2018 12:55 pm

In CentOS7 you can use hostnamectl
Top


Post Reply
  • Print view

4 posts • Page 1 of 1

Return to “Web Server”



  • Board index
  • All times are UTC
  • Delete all board cookies
  • The team
Powered by phpBB® Forum Software © phpBB Limited
*Original Author: Brad Veryard
*Updated to 3.2 by MannixMD
 

 

Login  •  Register

I forgot my password