LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Localhost not resolving correctly (https://www.linuxquestions.org/questions/linux-newbie-8/localhost-not-resolving-correctly-618680/)

SimbaSpirit 02-04-2008 05:08 PM

Localhost not resolving correctly
 
I'm using gutsy and I have Xampp installed.

I set up an account at dyndns and set up a "Host with IP" account.
filefarm.selfip.com is the address to the server I'm trying to set up.

As I understand, after you setup xampp you can go to http://localhost (resolved to 127.0.0.1, I checked) and it'll take you to a setup page where you can configure account names and passwords for the server (which'll clear up my problem of not being able to log in as user:root pass: <none>)

However, tying http://localhost or 127.0.0.1 returns the "... is taking too long to respond" error.

I browsed to /opt/lampp/htdocs and located the index.html file and opened it with firefox. index.html returned "Cannot find file at /xampp/".

I browsed to /opt/lampp/htdocs/xampp and found many files, but I can't figure out which one index.html is supposed to be looking opening.

So to recap:
http://localhost times out
index.html in /opt/lampp/htdocs returns error "cannot find file at /xampp/"
because of that I can't edit settings in xampp.


Thanks
-SS

gilead 02-04-2008 06:26 PM

Are you sure xampp started correctly after installation? What do you get for the following?
Code:

sudo /bin/netstat -nap | grep httpd
I haven't used xampp but the docs here cover installation, starting and testing so they may help.

Brian1 02-04-2008 06:29 PM

I did a quick google so what I see is this for the address.
http://localhost/xampp

Brian

SimbaSpirit 02-04-2008 07:02 PM

Quote:

Originally Posted by gilead (Post 3046125)
Are you sure xampp started correctly after installation? What do you get for the following?
Code:

sudo /bin/netstat -nap | grep httpd
I haven't used xampp but the docs here cover installation, starting and testing so they may help.



Returns
#... indicates space, since this forum deletes excess whitespace
tcp6...0....0 :::80..............:::*.....Listen....5
667/httpd
tcp6...0....0 :::443.............:::*.....Listen....5
667/httpd
unix 2.....[ ACC ]....STREAM.....LISTENING...20515....5748/httpd...../
opt/lampp/logs/cgisock.5667

Also, I clicked your link, that's the site I followed that got me to where I am, I looked through their articles again and I still see nothing relevant to localhost not working right, it says "to test, browse to http://localhost" or something similar, and I don't see an in depth man page and the FAQ page doesn't cover it.


Brian, I should have mentioned I tried http://localhost/xampp, as well as https://localhost/xampp, both time out.

Any more thoughts? If anyone knows of a program that's easy to use that'll enable me to do the same things as this I wouldn't mind switching at this point. But I'm new and need a GUI :)

-SS

gilead 02-04-2008 08:48 PM

Where the docs say to type /opt/lampp/lampp start do you get the same output that they did?
Code:

Starting XAMPP 1.6.5a...
LAMPP: Starting Apache...
LAMPP: Starting MySQL...
LAMPP started.

I'm assuming that you don't have another web server already listening on port 80.

LinuxCrayon 02-04-2008 11:30 PM

[EDIT] Accidentally skipped part of your first post. Okay. So is your firewall configured properly? [/EDIT]

SimbaSpirit 02-05-2008 12:09 AM

@gilead, my system responds similarly:
Starting XAMPP for Linux 1.5.6a...
XAMPP: Starting Apache with SSL (and PHP5)...
XAMPP: Starting MySQL...
XAMPP: Starting ProFTPD...
XAMP for Linux started.



@LinuxCrayon:
Good thought, I did have Samba installed but was intimidated by the lack of a GUI and I never removed it, so I just removed it via synaptic and tried localhost and 127.0.0.1 again, it still times out.



I'm too new at this to really bounce things off of you guys... any more ideas?

Thanks for all your continued help
-SS

Edit:
No firewall yet unless one comes preinstalled/activated, I intend to get firestarter once I actually get this thing working. I don't have any personal info on this comp right now and would rather get things working without that complication, then recomplicate it :p

LinuxCrayon 02-05-2008 12:24 AM

Okay. There should be an apache error log. I believe specifically it is named 'error_log'. Look for it in the Apache directories. Any errors? If so, what are they?

Sorry I can't provide a specific location, but I'm on my development machine. My server died on me. I'm not enough of a pro to know where things are without looking first. :(

chrism01 02-05-2008 12:27 AM

Try
iptables -L
to show any default firewall settings. It's the built-in 'firewall'. See http://www.linuxhomenetworking.com/w...Using_iptables

Re Apache try:
/var/log/apache2/error_log

SimbaSpirit 02-05-2008 01:22 AM

/var/log/apache2/error_log doesn't exist on my system (/var/log/ is as far as I get) and searching for it returns a couple of logs under LAMPP/lib/PHP
and one in opt/lampp/logs

opt/lampp/logs:
All errors relate to me trying to log into the server from my laptop and being shot down :p

This appears a few times as a warning:
[Mon Feb 04 21:02:17 2008] [warn] RSA server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
[Mon Feb 04 21:02:17 2008] [warn] RSA server certificate CommonName (CN) `localhost' does NOT match server name!?

and all notices say something like:
[Mon Feb 04 21:02:18 2008] [notice] Digest: generating secret for digest authentication ...
[Mon Feb 04 21:02:24 2008] [notice] Digest: done



-------

sudo iptables -L returned:

Chain INPUT (policy ACCEPT)
target prot opt source destination

Chain FORWARD (policy ACCEPT)
target prot opt source destination

Chain OUTPUT (policy ACCEPT)
target prot opt source destination


The error log's warning seems like a possible clue, anyone know how to remedy that?

-SS

billymayday 02-05-2008 01:53 AM

Are you trying this from the machine that you are running XAMPP on or across a network? Localhost will resolve to the machine you are on as the name suggests.

If XAMPP is on another box, try

http://other_box/xampp

SimbaSpirit 02-05-2008 02:06 AM

Yes I'm testing this on the box with XAMPP on it.

Also, I have an IP set up from DYNDNS, but I need to fix the first problem to edit user accts.

billymayday 02-05-2008 02:33 AM

The DYNDNS part is irrelevant for now.

Have a look in /etc/httpd/conf.d for something called xampp.conf or similar and post it here.

If there isn't one, try


find /var -name xampp*

or

find /var -name XA*

SimbaSpirit 02-05-2008 03:01 AM

only search match for xampp.conf was in opt/lampp/etc/extra
searching for httpd only returned this as well
httpd-lampp.conf:

Quote:

<IfDefine PHP4>
LoadModule php4_module modules/libphp4.so
</IfDefine>
<IfDefine PHP5>
LoadModule php5_module modules/libphp5.so
</IfDefine>
# since LAMPP 0.9.8:
LoadModule perl_module modules/mod_perl.so

Alias /phpmyadmin "/opt/lampp/phpmyadmin"
Alias /phpsqliteadmin "/opt/lampp/phpsqliteadmin"

# since XAMPP 1.4.3
<Directory "/opt/lampp/phpmyadmin">
AllowOverride AuthConfig Limit
Order allow,deny
Allow from all
</Directory>

<Directory "/opt/lampp/phpsqliteadmin">
AllowOverride AuthConfig Limit
Order allow,deny
Allow from all
</Directory>

# since LAMPP 1.0RC1
AddType application/x-httpd-php .php .php3 .php4

XBitHack on

# since 0.9.8 we've mod_perl
<IfModule perl_module>
PerlModule Bundle::Apache2
</IfModule>

# demo for mod_perl responsehandler
#PerlModule Apache::CurrentTime
#<Location /time>
# SetHandler modperl
# PerlResponseHandler Apache::CurrentTime
#</Location>

# AcceptMutex sysvsem is default but on some systems we need this
# thanks to jeff ort for this hint
#AcceptMutex flock
#LockFile /opt/lampp/logs/accept.lock

# this makes mod_dbd happy - oswald, 02aug06
# mod_dbd doesn't work in Apache 2.2.3: getting always heaps of "glibc detected *** corrupted double-linked list" on shutdown - oswald, 10sep06
#DBDriver sqlite3

SimbaSpirit 02-05-2008 01:48 PM

Is this something that reinstalling ubuntu could fix? So far I've only installed a couple of programs, so its no big deal.


All times are GMT -5. The time now is 08:45 AM.