Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I have apache2 and Xampp both installed in my server now my problem is

When i stop apache2 from /etc/init.d/apache2 stop

and tried restart xampp like /opt/lampp/lampp restart i am getting the response

Stopping XAMPP for Linux 1.7.3a...
XAMPP: XAMPP-Apache is not running.
XAMPP: XAMPP-MySQL is not running.
XAMPP: XAMPP-ProFTPD is not running.
XAMPP stopped.
Starting XAMPP for Linux 1.7.3a...
XAMPP: Another web server daemon is already running.
XAMPP: Another MySQL daemon is already running.
XAMPP: Another FTP daemon is already running.
XAMPP for Linux started.

But i am unable to access mylocalhost when i am trying this

/opt/lampp/lampp status 

Each time i am getting

Version: XAMPP for Linux 1.7.3a
Apache is not running.
MySQL is not running.
ProFTPD is not running.

Please tell me what might wrong with my xampp ?

share|improve this question
    
Does the apache process appear in the ps fax command list? If yes you might have to use kill to shut it down manually before you can start it again. And check your error logs. There might be something in there. –  Louis Huppenbauer Oct 5 '12 at 6:35
    
you are using linux or windows ? –  Amrish Prajapati Oct 5 '12 at 6:35
    
I am using linux (ubuntu) –  user1667633 Oct 5 '12 at 6:37
    
you can check if a program is blocking the http port with sudo netstat -nlp |grep 80 –  Gerald Schneider Oct 5 '12 at 6:51
1  
Have you checked the logs ? Can you post the errors you see in the log files. –  topdog Oct 5 '12 at 7:19

2 Answers 2

  1. Open the file /opt/lampp/etc/httpd.conf
  2. Search the "Listen 80" and change it to some other port (e.g. Listen 2145) (Line No. 40)
  3. Open the file /opt/lampp/etc/extra/httpd-ssl.conf
  4. Search the "Listen 443" and change it to some other port (e.g. Listen 16443) (Line No. 39)
  5. Open the file /opt/lampp/lampp
  6. Search for the port "testport 80" and replace it to "testport 2145". Also change the "testport 443" to "testport 16443". (Happens to be the Line No. 197, 214)
  7. Now go and run /opt/lampp/lampp start. (It should work now).
share|improve this answer

What's wrong is that you're using xampp. Don't do that, just use the apache/mysql/whatever packages provided by Ubuntu, there's absolutely no need to use xampp on any modern linux distro. So remove xampp and your problems will go away. And as a side benefit you also get security updates so your server doesn't get compromised within a week.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.