Testing the webserver configuration of Apache and Nginx web server

Test your configuration of your webserver before you reload your webserver with the following commands:

Test your Apache2 web server config:

apachectl configtest

Test your Nginx web server config:

nginx -t