Apache httpd. conf configuration file syntax verification,

Source: Internet
Author: User

Apache httpd. conf configuration file syntax verification,

After the httpd. conf file of Apache is modified, the server must be restarted to take effect.

Sometimes, when the server provides services, directly changing the configuration and restarting the service poses a great risk.

If you can verify the correct syntax and restart the server after modifying the configuration, you can avoid unnecessary errors.

For the preceding requirements, Apache provides commands to verify the syntax of the configuration file.

Windows commands:

Httpd-t


Linux commands:
[Root @ server bin] # ./Apachectl configtest


If the information is correct, Syntax OK is displayed.
Syntax OK

If an error exists, the error line number and error message are displayed as follows:
AH00526: Syntax error on line 339 of/opt/apache/conf/httpd. conf:

Invalid command 'A', perhaps misspelled or defined by a module not supported in the server configuration





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.