To stop Apache from starting on a Linux system, you can disable the Apache service using the appropriate method for your operating system and the version of Apache that you are using. Disabling the Apache service will prevent it from starting automatically when the system boots, and you can start or stop the Apache service manually as needed.
Here are some examples of how to disable the Apache service on different Linux systems:
sudo systemctl disable apache2
This will disable the Apache service on a system that uses the Apache 2 web server.
sudo mv /etc/init.d/httpd /etc/init.d/httpd.disabled
This will disable the Apache service on a system that uses the Apache HTTP server.
With these examples, you should be able to disable the Apache service on your Linux system using the appropriate method for your operating system and the version of Apache that you are using. Consult the documentation of your operating system and Apache for more information on how to disable and manage services on your system.