“localhost? Never heard’o ‘em, boy!” April 5, 2007
Posted by Nirmal in IT, life, linux.trackback

Web engineering is my day job so had to have at least PHP / MySQL / Apache trio on my computer. Although I’ve got XAMPP on Windows said XP isn’t very happy about my old hardware but Edubuntu is. So using a link a kind gentleman left on my blog, went and downloaded XAMPP Linux from Apachefriends. The webpage itself has all the instructions necessary so stuff was very easy. First say sudo tar xvfz xampp-linux-1.6.tar.gz -C /opt. Edu obeyed without a nod. Then say sudo /opt/lampp/lampp start.Again Edu started all the services obediently. Then the moment of truth, fire up Firefox and say http://localhost. But nothing. Firefox can’t establish a connection to the server at localhost. Great. I can’t imagine why cause the installation and startup happened without a hitch. At least apparently.
I’ve installed XAMPP in Windows about twice but all the times the localhost could be accessed at once. I tried everything from restarting to banging on the computer but nothing.
I wonder whether anyone could give me some advice. I took a look at XAMPP Linux’s FAQ page but didn’t find anything very enlightening there, I guess. Here’s the error log:
[Wed Apr 04 19:22:16 2007] [notice] suEXEC mechanism enabled (wrapper: /opt/lampp/bin/suexec)
[Wed Apr 04 19:22:16 2007] [warn] RSA server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
[Wed Apr 04 19:22:16 2007] [warn] RSA server certificate CommonName (CN) `localhost’ does NOT match server name!?
[Wed Apr 04 19:22:24 2007] [notice] Digest: generating secret for digest authentication …
[Wed Apr 04 19:22:24 2007] [notice] Digest: done
[Wed Apr 04 19:22:25 2007] [warn] RSA server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
[Wed Apr 04 19:22:25 2007] [warn] RSA server certificate CommonName (CN) `localhost’ does NOT match server name!?
[Wed Apr 04 19:22:27 2007] [notice] Apache/2.2.4 (Unix) DAV/2 mod_ssl/2.2.4 OpenSSL/0.9.8d PHP/5.2.1 mod_apreq2-20051231/2.5.7 mod_perl/2.0.2 Perl/v5.8.7 configured — resuming normal operations
[Wed Apr 04 20:04:51 2007] [notice] caught SIGTERM, shutting down
[Wed Apr 04 20:05:23 2007] [notice] suEXEC mechanism enabled (wrapper: /opt/lampp/bin/suexec)
[Wed Apr 04 20:05:23 2007] [warn] RSA server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
[Wed Apr 04 20:05:23 2007] [warn] RSA server certificate CommonName (CN) `localhost’ does NOT match server name!?
[Wed Apr 04 20:05:29 2007] [notice] Digest: generating secret for digest authentication …
[Wed Apr 04 20:05:29 2007] [notice] Digest: done
[Wed Apr 04 20:05:30 2007] [warn] RSA server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
[Wed Apr 04 20:05:30 2007] [warn] RSA server certificate CommonName (CN) `localhost’ does NOT match server name!?
[Wed Apr 04 20:05:33 2007] [notice] Apache/2.2.4 (Unix) DAV/2 mod_ssl/2.2.4 OpenSSL/0.9.8d PHP/5.2.1 mod_apreq2-20051231/2.5.7 mod_perl/2.0.2 Perl/v5.8.7 configured — resuming normal operations
[Wed Apr 04 20:11:47 2007] [notice] caught SIGTERM, shutting down
[Wed Apr 04 20:15:34 2007] [notice] suEXEC mechanism enabled (wrapper: /opt/lampp/bin/suexec)
[Wed Apr 04 20:15:34 2007] [warn] RSA server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
[Wed Apr 04 20:15:34 2007] [warn] RSA server certificate CommonName (CN) `localhost’ does NOT match server name!?
[Wed Apr 04 20:15:40 2007] [notice] Digest: generating secret for digest authentication …
[Wed Apr 04 20:15:40 2007] [notice] Digest: done
[Wed Apr 04 20:15:41 2007] [warn] RSA server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
[Wed Apr 04 20:15:41 2007] [warn] RSA server certificate CommonName (CN) `localhost’ does NOT match server name!?
[Wed Apr 04 20:15:42 2007] [notice] Apache/2.2.4 (Unix) DAV/2 mod_ssl/2.2.4 OpenSSL/0.9.8d PHP/5.2.1 mod_apreq2-20051231/2.5.7 mod_perl/2.0.2 Perl/v5.8.7 configured — resuming normal operations
[Thu Apr 05 07:35:04 2007] [notice] suEXEC mechanism enabled (wrapper: /opt/lampp/bin/suexec)
[Thu Apr 05 07:35:05 2007] [warn] RSA server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
[Thu Apr 05 07:35:05 2007] [warn] RSA server certificate CommonName (CN) `localhost’ does NOT match server name!?
[Thu Apr 05 07:35:14 2007] [notice] Digest: generating secret for digest authentication …
[Thu Apr 05 07:35:14 2007] [notice] Digest: done
[Thu Apr 05 07:35:16 2007] [warn] RSA server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
[Thu Apr 05 07:35:16 2007] [warn] RSA server certificate CommonName (CN) `localhost’ does NOT match server name!?
[Thu Apr 05 07:35:20 2007] [notice] Apache/2.2.4 (Unix) DAV/2 mod_ssl/2.2.4 OpenSSL/0.9.8d PHP/5.2.1 mod_apreq2-20051231/2.5.7 mod_perl/2.0.2 Perl/v5.8.7 configured — resuming normal operations
try using http://127.0.0.1 - I can’t imagine why should make a difference, but your loopback adaptor should always have that address available.
Also, see if the server actually starts… an easy way to discover this is by telnetting (yes, telnet) to 127.0.0.1:80 (if indeed, port 80 is your webserver default listening port). If telnet hangs, then you do have something listening there… press enter twice and see if you get a header dump ;) [conversely, if you know how to use nmap or lsof, see if httpd is listening on port 80] if not, the server hasn’t started, consult the error log for more clues.
[or email me offline if you want. can't promise that I'll know what's going on though]
You are running SSL - is it serving on port 80? Or 443? Have you tried https://localhost or https://127.0.0.1?
You could also have a look in your /etc/resolv.conf file to see what is defined - it may be wanting an FQDN format instead of just localhost (ex. - localhost.localdomain)
I have a same problem before, I try to rename httpd.conf.bak to httpd.conf start lampp and everythink now works fine.
Looks like quite a few people had problems running XAMPP on Linux. I also had a problem which I can’t remember now, :) I recommend XAMPP for people on Windows, but on Linux I just roll what I want.
This is totally irrelevant, but as I see you are into Web applications, may I suggest you a look into Ruby on Rails? You probably have heard about it. Anyway BitRock people provides an installer and an environment much like XAMPP for Ruby. This RubyStack includes Apache, Mongrel, Rails, Capistrano, RMagic and more. It’s available at http://bitrock.com/download_ruby_download.html
Then I realized that this also might help
http://bitrock.com/download_webstacks_download.html
thanks :-)