Remember to help your friend with the Apache site 403 error process

Source: Internet
Author: User
Tags fully qualified domain name

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.