Apache version:
grep httpdhttpd-tools-2.2. El6.centos. 3 . X86_64HTTPD-2.2. El6.centos. 3. x86_64
Let's talk about the final solution:
Change the specific server IP in the virtual.conf in the/etc/httpd/conf.d/directory to the * number.
Resolution process:
1, Apache found error when starting:
Starting httpd:httpd:Could not reliably determine the server ' s fully qualified domain name, using [specific IP] for ServerName
Specifies a specific IP for the servername in the config file/etc/httpd/conf/httpd.conf, and IP is specified as follows:
ServerName Server public network IP:
2, this time to start success, visit the site, came out of the Apache test page, Titile: Apache HTTP Server test page powered by CentOS. And the report is 403 errors, so in the Internet to find information, an article said that the virtual machine configuration error, and then added the configuration of the virtual machine (my buddy is placed in a virtual.conf file, the 4th will have a description), as follows:
<virtualhost *:># ServerAdmin [email protected]-host.example.com /www/ docs/dummy-host.example.com ServerName dummy-host.example.com# errorlog logs/ dummy-host.example.com-error_log# customlog logs/dummy-host.example.com-access_log common# </VirtualHost>
Change DocumentRoot and ServerName to the specific site directory and domain name, then reboot, access in the browser, OK. It can be accessed normally.
Reference URL: https://www.cnblogs.com/wajika/p/6481167.html, inside of the 3rd.
3, but this buddy on a server put several sites ah, so I leaf out, first copy a <virtualhost>,, hold the mentality to try to see if OK, and then restart Apache, the results of new problems have been produced:
Starting httpd: [Sat Jul 23:19:47 2018] [warn] _default_ VirtualHost overlap on port, the first has precedence.
This means that 80 ports overlap, and the first virtual machine takes precedence. So on the Internet to find information, this article has talked about the solution: https://www.cnblogs.com/xyh592/p/5762729.html
You need to uncomment the #namevirtualhost *:80 as follows:
Namevirtualhost *:
Two sites are accessible after the Apache restart.
4, this buddy alone put the virtual machine configuration in a file, in the httpd.conf file can be seen: Include conf.d/*.conf, so find this file, the file inside all the IP is changed to * number on the line.
Finally the perfect solution to the problem.
Remember to help your friend with the Apache site 403 error process