1

I am using Ubuntu 14.04. I've installed xampp. When I open the xampp control panel (as root/another user) all the services start running when I click start except Apache WebServer. What can I do to make it start?

Zanna
  • 70,465

5 Answers5

9

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
Zanna
  • 70,465
Jos
  • 29,224
  • it shows that:

    "* apache2 is not running" what can I do now?

    – Rony_joker Feb 24 '15 at 17:03
  • You could start it with sudo service apache2 start but that will probably fail because of this other service that is already running. Find out what process this is by doing sudo netstat -talp|grep http. This will give you a process id. Kill that process, and try to start Apache2 again. – Jos Feb 24 '15 at 17:29
  • I have installed prestashop. for that maybe I need apache2 server. Is there any other method so that can start apache in xampp without stopping apache2 server – crazy hoe Jan 21 '21 at 14:41
6

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).
Zanna
  • 70,465
rudset
  • 61
  • 1
    But you are now using the wrong port numbers. Maybe it was a better approach to find out what blocked port 80 and/or 443 instead. – Soren A Jan 21 '21 at 15:13
  • Now you have to access the localhost with the port. I.e. before was omitted (80) now its localhost:8000 – testing_22 Dec 31 '21 at 22:36
1

At first you can try the two statements for apache which are:

  • sudo service apache2 status

  • sudo service apache2 stop

Even after this if it doesnt work then your port (mostly 80) is busy with some process and to see the process on port 80: type this:-

  • sudo netstat -lpn |grep :80

we have to kill the process in order for apache to work: type this

  • sudo kill sudo lsof -t -i:80

and then by xampp apache should finally work, and it can be verified by viewing localhost and phpmyadmin

0
  • Open your terminal and run the following command sudo apachectl stop
  • Try rerunning your apache server from xamp again.
niicode
  • 1
  • 1
0

Start xampp by sudo /opt/lampp/lampp start this usually will return the error, already running etc.

muru
  • 197,895
  • 55
  • 485
  • 740
radibg2
  • 186
  • it shows:

    Starting XAMPP for Linux 5.5.19-0... XAMPP: Starting Apache...fail. XAMPP: Another web server is already running. XAMPP: Starting MySQL...ok. XAMPP: Starting ProFTPD...ok.

    and my Apache Webserver is not running and stopped. What should I do to make other web server stop?

    – Rony_joker Feb 24 '15 at 17:03
  • Try "/etc/init.d/apache2 stop" or "sudo service apache2 stop" – radibg2 Feb 28 '15 at 11:13
  • I've tried it. But Still it's not working :( – Rony_joker Mar 30 '15 at 19:09