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