LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 03-18-2009, 03:02 AM   #16
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,175
Blog Entries: 1

Rep: Reputation: 2042Reputation: 2042Reputation: 2042Reputation: 2042Reputation: 2042Reputation: 2042Reputation: 2042Reputation: 2042Reputation: 2042Reputation: 2042Reputation: 2042

Quote:
Hey, do you mean this error?
Quote:
Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
Since I have "ServerName localhost" in the VirtualHost section, I don't see why I'm getting this.
Yes I mean this warning (not error). If you want to get rid of it you should use a ServerName in /etc/apache2/conf.d/local.
Quote:
And don't know why I can't connect to localhost.

BTW, the message I get in the browser is:
Quote:
The requested URL / was not found on this server.
Again, I don't get this message when I use 192.168.1.20
You do connect to localhost, but it cannot show you the index page, because it somehow uses a wrong DocumentRoot (/htdocs) according to your logs.
Anyway create a file xxx.htm in /var/www/localhost, point your browser to http://localhost/xxx.htm and watch the error_log.
If it doesn't work. post the error and also the output of:
Code:
ls -l /var/www
ls -l /var/www/localhost
 
Old 03-18-2009, 10:28 AM   #17
anw
Member
 
Registered: Sep 2003
Location: Florida
Distribution: Debian
Posts: 94

Original Poster
Rep: Reputation: 15
Ok, so just to make sure I understand, it matters whether the "ServerName localhost" is in /etc/apache2/conf.d/local, vs. being in the virtual host section of /etc/apache2/sites-enabled?

And regarding the document root /htdocs, what you said is what I inferred, but I have no idea how it is getting or picking up "/htdocs". I have grep'd through every apache file I could find, and the only reference to "/htdocs" was in the apache binary.

I will be back at the machine this evening and will try what you suggest.

Thanks!
 
Old 03-18-2009, 05:03 PM   #18
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,175
Blog Entries: 1

Rep: Reputation: 2042Reputation: 2042Reputation: 2042Reputation: 2042Reputation: 2042Reputation: 2042Reputation: 2042Reputation: 2042Reputation: 2042Reputation: 2042Reputation: 2042
ServerName in a vhost definition gives the name of that vhost. ServerName in the general config file "gives the name that the server uses to identify itself" (taken from the httpd.conf documentation). You can set it to avoid the warning on apache startup.
Now about the real problem, do what I've told you and also post the output of:
Code:
ps -ef|grep http
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Trying webmin, getting "attempt to connect to 127.0.0.1:10000 (localhost) failed" jeffreybluml Linux - General 1 08-16-2007 11:16 AM
[Apache2] Localhost can connect to HTTPS, but not clients in the LAN Akhran Linux - Newbie 3 09-12-2005 05:13 PM
Apache2 debian sarge: browser can't connect to the localhost blueheart Linux - Software 5 07-15-2005 11:12 AM
[apache2] could not connect to host localhost LordFrancis Linux - Networking 1 09-30-2004 02:37 PM
localhost vs computer name vs 127.0.0.1 modeler4547 Linux - General 0 02-26-2003 05:53 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 03:03 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration