LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (http://www.linuxquestions.org/questions/linux-server-73/)
-   -   httpd2.2.15 access to localhost test page issue (http://www.linuxquestions.org/questions/linux-server-73/httpd2-2-15-access-to-localhost-test-page-issue-813923/)

NightSky 06-13-2010 03:43 PM

httpd2.2.15 access to localhost test page issue
 
Can't access localhost test page, but opens localhost page when I use full dns, at least from local network machines???
Running slackware13.1, Httpd2.2.15, 2wire gateway. Firewall web&http pinholes for ports 80,443. Port 80 is working.

Code:

lynx 4400 or http://localhost
returns error:
Quote:

Looking up 4400 first
Making HTTP connection to 4400
Alert! unable to connect to remotehost.
lynx:Can't access startfile Http://4400
4400 is machine name or server box name.
httpd.conf =
Code:

Listen 127.0.0.1:80
ServerName 4400

/etc/hosts =
Code:

127.0.0.1 localhost
192.168.1.xxx 4400.4400host.net 4400

Added 4400host.net to Resolve DNS on 2Wire Gateway(Never had to do this before to access httpd test from same machine or network machine?

Changed HTTPD.conf
Code:

Listen 192.168.x.xxx:80
ServerName 4400host.net

Code:

lynx 4440host.net returns
Quote:

"It Works!"
Never encountered this before, usually httpd test worked for "localhost" with minimal effort. I am concerned to procceed with this odd behavior. Has anyone else encountered this configuration is?

natex 06-13-2010 04:08 PM

'ServerName' must be a fully qualified domain name. What happens when ServerName=4400.4400host.net ?

NightSky 06-14-2010 02:06 AM

Quote:

Originally Posted by natex (Post 4002436)
'ServerName' must be a fully qualified domain name. What happens when ServerName=4400.4400host.net ?

Code:

lynx 4400
Looking up 4400 first
Making HTTP connection to 4400
Alert! unable to connect to remotehost.
lynx:Can't access startfile Http://4400

Code:

lynx 4400.4400host.net
It Works!

Code:

lynx 4400host.net
It Works!

Is this odd behavior to you? Trying to access localhost returns "Alert! unable to connect to remotehost?"

NightSky 06-15-2010 04:29 AM

I think part of the issue has to do with my having partitions this box for /var/www root document while in slackware13.1 Httpd2.2.15 Default Layout is set for /srv/www
being the root document directory.
http://wiki.apache.org/httpd/DistrosDefaultLayout
While folks are still recommending on forums using /var/www because it is considered the standard? I find this confusing and others say it doesn't matter where you put your root doc directory? It would be helpful if when people provide advice on a particular layout they would provide the one they are using as an example and why they prefer that layout. Just a suggestion. Thanks

natex 06-15-2010 11:12 PM

As I suggested, please change 'ServerName' in httpd.conf to a fully qualified domain name. i.e. "4400.4400host.net"

NightSky 06-16-2010 04:24 PM

natex, thank you.. i had not ignored your suggestion.. i did change
ServerName = 4400.4400host.net then i posted results above:
lynx localhost works and above lynx combos work from installed machine but not lynx 4400.
From network machines only 4400host.net will connect, not localhost, 4400 or ip... so just tell me if this is correct behavior?
I am reinstalling again anyway because I want to partition hdd for /srv instead of /var.
Have other 2 more questions:
1) Can I install webmin on seperate nas box from where i installed httpd?
2) If i am setting up virtualhosts do still config Main Section ServerName with qualified domain name or ip? Was looking at:
http://www.xenocafe.com/tutorials/li...rver/index.php Tutorial maybe outdated.
Thank you


All times are GMT -5. The time now is 05:58 AM.