How can one restart the Apache server on a UNIX system to apply changes to the configuration?

To apply changes to the Apache server configuration on a UNIX system, you can restart the server using the command `sudo service apache2 restart` or `sudo systemctl restart apache2`. This will reload the configuration files and apply any changes made.

<?php
exec('sudo service apache2 restart');
?>