xampp: Apache WebServer is stopped

This is what works for me

  1. Open the file /opt/lampp/etc/httpd.conf
  2. Find Listen 80 and change it to some other port (eg Listen 8000)
  3. Open the file /opt/lampp/etc/extra/httpd-ssl.conf
  4. Find Listen 443 and change it to some other port (eg Listen 4431)
  5. Open the file /opt/lampp/lampp
  6. Search for the testport 80 and replace it with testport 8000. Also change testport 443 to testport 4431.
  7. Now run /opt/lampp/lampp start (it works now).

First, verify that the service is not already running:

sudo service apache2 status

If it is running, to stop it, do

sudo service apache2 stop