[SOLVED] Apache would not start

Problems with the Linux version of XAMPP, questions, comments, and anything related.

[SOLVED] Apache would not start

Postby DC80 » 03. January 2012 14:14

Hi everyone,

I need some help getting apache running. Now, i think there is nothing wrong with the installed XAMPP package, however i do need some linux help. The following is occuring:

Code: Select all
mint12lisa@desktop:~$ sudo /opt/lampp/lampp start
Starting XAMPP for Linux 1.7.7...
XAMPP: Another web server daemon with SSL is already running.
XAMPP: Starting MySQL...
XAMPP: Starting ProFTPD...
XAMPP for Linux started.


After this command, apache is not running and also i'm not able to indentify the running process which keeps apache from running.

The commands i ran:
Code: Select all
sudo ps aux
sudo ps aux | less
sudo netstat -lp
sudo netstat -lptu
sudo lsof -i


Non of which gave me more info. Still a linux noob i guess :D.

Update 201201031502:
I'd removed XAMPP and cleared the cache of my browser. After a restart of my browser i find this on my projects folder:

Apache/2.2.21 (Unix) DAV/2 mod_ssl/2.2.21 OpenSSL/1.0.0c PHP/5.3.8 mod_apreq2-20090110/2.7.1 mod_perl/2.0.5 Perl/v5.10.1

This is on port 80 on localhost. This is strange because i'm not aware of running any service on this port except my webserver (which i remove for reinstall).

Could it be that my partitionscheme has something to do with this? I have this scheme:

/ ==> 100 Gb
/home ==> about 277 Gb (also home of my projects/dev/root folder for apache)
/swap 8 Gb

If my system crashes my data will be save and for an example, if i need to reinstall my system and i need to install thunderbird all will be there such as mail, settings, etc.

Thanks in advance.

DC80
Last edited by DC80 on 07. January 2012 11:35, edited 1 time in total.
DC80
 
Posts: 24
Joined: 11. March 2011 13:35
Operating System: Linux Mint 12 (lisa)

Re: Apache would not start

Postby JonB » 03. January 2012 15:18

It means the distribution you installed has an Apache server 'defaulted' into it, or that you have inadvertently installed or activated httpd (the Apache daemon) while configuring your system.

You should 'research' this and determine if any other elements of XAMPP/LAMPP are duplicated - primarily MySQL and/or FTP.

http://en.wikipedia.org/wiki/Linux_Mint

this topic may be useful -
http://forums.linuxmint.com/viewtopic.php?f=46&t=75473

Then your options are to 'disable' (turn off via software configuration files) or 'remove' (back out) the packages that are duplicated. Its almost always safer to do the former than the latter.

Good Luck
8)
User avatar
JonB
AF Moderator
 
Posts: 3210
Joined: 12. April 2010 16:41
Location: Land of the Blazing Sun
Operating System: Windows XP/7 - Fedora 15 1.7.7

Re: Apache would not start

Postby DC80 » 03. January 2012 15:55

Thank you very much for your answer. I did checkout the links you gave me. However, I did execute the commands which gave back 0. No known services were installed. Also the command chkconfig did return nothing.

I will install XAMPP again and come back to you.
DC80
 
Posts: 24
Joined: 11. March 2011 13:35
Operating System: Linux Mint 12 (lisa)

Re: Apache would not start

Postby JonB » 03. January 2012 16:29

I don't think removing and re-installing XAMPP will change things - there either is or is not another instance of Apache installed. Kinda like pregnancy.

Issue this command in term:

Code: Select all
[jonb@localhost ~]$ su
Password:
[root@localhost jonb]# httpd -v


the result will tell you if Mint 'thinks' you have an installed Apache webserver.
(I'm guessing we will get a 'reply' - version number)

which would look like this:
Code: Select all
[jonb@localhost ~]$ su
Password:
[root@localhost jonb]# httpd -v
Server version: Apache/2.2.21 (Unix)
Server built:   Sep 13 2011 13:46:23


If the result is 'like this'

Code: Select all
bash: httpd: command not found...
Install package 'httpd' to provide command 'httpd'? [N/y]


then your idea that Apache is not installed is correct.

Good Luck
8)
User avatar
JonB
AF Moderator
 
Posts: 3210
Joined: 12. April 2010 16:41
Location: Land of the Blazing Sun
Operating System: Windows XP/7 - Fedora 15 1.7.7

Re: Apache would not start

Postby DC80 » 03. January 2012 22:33

I do get a result "like this":

Code: Select all
command 'httpd' not found, did you mean:
 command 'dhttpd' from package 'dhttpd' (universe)
 command 'xttpd' from package 'xtide' (universe)
 command 'thttpd' from package 'thttpd' (universe)
httpd: command not found


So Mint is thinking that apache is not running, how ever to be sure i checked. I gave the start command to XAMPP with this result:

Code: Select all
 /opt/lampp/lampp start
Starting XAMPP for Linux 1.7.7...
XAMPP: Another web server daemon with SSL is already running.
XAMPP: XAMPP-MySQL is already running.
XAMPP: XAMPP-ProFTPD is already running.
XAMPP for Linux started.


So, the question is how comes mint thinks apache is running and it is really not? :S

Thanks for the help.

Regards,

DC80
DC80
 
Posts: 24
Joined: 11. March 2011 13:35
Operating System: Linux Mint 12 (lisa)

Re: Apache would not start

Postby JonB » 04. January 2012 01:06

Update 201201031502:
I'd removed XAMPP and cleared the cache of my browser. After a restart of my browser i find this on my projects folder:

Apache/2.2.21 (Unix) DAV/2 mod_ssl/2.2.21 OpenSSL/1.0.0c PHP/5.3.8 mod_apreq2-20090110/2.7.1 mod_perl/2.0.5 Perl/v5.10.1

This is on port 80 on localhost. This is strange because i'm not aware of running any service on this port except my webserver (which i remove for reinstall).

Could it be that my partitionscheme has something to do with this? I have this scheme:

/ ==> 100 Gb
/home ==> about 277 Gb (also home of my projects/dev/root folder for apache)
/swap 8 Gb

If my system crashes my data will be save and for an example, if i need to reinstall my system and i need to install thunderbird all will be there such as mail, settings, etc.


OK "when" in this sequence did you make that discovery???

It appears my initial concept was correct.

Where do we stand right now???
:?:
User avatar
JonB
AF Moderator
 
Posts: 3210
Joined: 12. April 2010 16:41
Location: Land of the Blazing Sun
Operating System: Windows XP/7 - Fedora 15 1.7.7

Re: Apache would not start

Postby DC80 » 06. January 2012 10:18

I'm very sorry for my late reply, i had some matters to attend to.

Almost right after my first post of this topic.

I checked synaptic package manager but no apache server was installed during the OS installation. It is not an server OS either.

Edit 201201061026:

I restored the default config without any luck.

Edit 201201061257:

After entering this command:

Code: Select all
sudo netstat -tunap | grep LISTEN


I could see two processes tie up port 443. Those processes are:

- vmware-hostd
- cupsd

This would be strange because i had never a problem with this. I do not use SSL so port 443 is not in use by me.
DC80
 
Posts: 24
Joined: 11. March 2011 13:35
Operating System: Linux Mint 12 (lisa)

Re: Apache would not start

Postby JonB » 06. January 2012 21:30

OK

try this command (as root)

/opt/lampp/lampp stopssl

Stops the Apache SSL support. This command deactivates the SSL support permanently, e.g. if you restarts XAMPP in the future SSL will stay deactivated.

found here:
http://www.apachefriends.org/en/xampp-linux.html

Then use the opt/lampp/lampp stop (to shut down the other services.)

Now, see if Apache starts when you use /opt/lampp/lampp start.

There reason this was probably not a problem in the past is that HTTPS/SSL support was not defaulted on in older versions of Apache.

Good Luck
8)
User avatar
JonB
AF Moderator
 
Posts: 3210
Joined: 12. April 2010 16:41
Location: Land of the Blazing Sun
Operating System: Windows XP/7 - Fedora 15 1.7.7

Re: Apache would not start

Postby DC80 » 07. January 2012 11:33

Thank you JonB! It finally works :D

But still, this is a little confusing for me and begging for more questions. For example, when running XAMPP 1.7.7 under (K)Ubuntu 11.10 i had no problem what so ever. So why is Mint gave me a headache? It is an Ubuntu based distro, is it not?

However, this is what i did based on your instructions:
Step 1: Gave the command to stop SSL (it gave me a error because apache wasn't running, so i got the idea SSL could not be stopped)
Code: Select all
sudo /opt/lampp/lampp stopssl

Step 2: Start apache manually
Code: Select all
sudo /opt/lampp/lampp startapache

Step 3: Stop SSL
Code: Select all
 
sudo /opt/lampp/lampp stopssl

Step 4: Start XAMPP altogether
Code: Select all
sudo /opt/lampp/lampp start
DC80
 
Posts: 24
Joined: 11. March 2011 13:35
Operating System: Linux Mint 12 (lisa)

Re: [SOLVED] Apache would not start

Postby JonB » 07. January 2012 19:16

Great!

I'm glad you got it working, and that you posted the exact steps needed. :)

As for 'why'? 'angel dust' (LOL).

Seriously, who knows? The linux community has built so many variants/distributions that its impossible to tell what is where, or how it works any longer. AND you can point the finger directly at the 'desktop-izers' of Linux as the problem children. (that of course is 'my opinion only'). :shock:

Good Luck, and I'm glad its working.

8)
User avatar
JonB
AF Moderator
 
Posts: 3210
Joined: 12. April 2010 16:41
Location: Land of the Blazing Sun
Operating System: Windows XP/7 - Fedora 15 1.7.7

Re: [SOLVED] Apache would not start

Postby deep64blue » 17. April 2012 18:46

A couple of comments:-

1) Although it gives an error the first stopssl command actually works (otherwise step 2 wouldn't!!). so you only need steps 1 and 4.

2) I have found that vmware can be the culprit:-

Code: Select all
tcp        0      0 :::443                      :::*                        LISTEN      1727/vmware-hostd
Fedora 16 64-bit / XAMPP 1.7.7
deep64blue
 
Posts: 2
Joined: 19. July 2011 22:38

Re: [SOLVED] Apache would not start

Postby stuwi » 01. June 2012 08:33

i found this helpful

issue the following two commands to start your Xampp
sudo /etc/init.d/apache2 stop
sudo /opt/lampp/lampp restart


hope that helps

stuwi
stuwi
 
Posts: 1
Joined: 01. June 2012 08:28
Operating System: linux

Re: [SOLVED] Apache would not start

Postby JonB » 03. June 2012 15:40

@ stuwi -

what this:
Code: Select all
sudo /etc/init.d/apache2 stop


indicates is that you likely have another Apache server installed and it is 'auto-starting'(probably it was included in your distribution/version of Linux).

You might find this useful:

http://www.aboutlinux.info/2006/04/enab ... ng_01.html

Good Luck
8)
User avatar
JonB
AF Moderator
 
Posts: 3210
Joined: 12. April 2010 16:41
Location: Land of the Blazing Sun
Operating System: Windows XP/7 - Fedora 15 1.7.7

Re: [SOLVED] Apache would not start

Postby JonB » 03. June 2012 15:53

@ deep64blue

Right on both points.

Virtual environments pose a large challenge unless you work with them regularly, and they are all different in implementation. Thanks for pointing out that use of a 'common' port.

8)
User avatar
JonB
AF Moderator
 
Posts: 3210
Joined: 12. April 2010 16:41
Location: Land of the Blazing Sun
Operating System: Windows XP/7 - Fedora 15 1.7.7


Return to XAMPP for Linux

Who is online

Users browsing this forum: No registered users and 19 guests