Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

configuring name based server 2

Status
Not open for further replies.

genovaweb

Technical User
Jan 22, 2010
6
IT
I continually time out on attempted connection from a different machine.
I now have about 200 different combinations that don't work and any help7pointers might save me from a nervous breakdown.

Using trace appears to resolve correctly to the DNS server (afraid.org)

My config file has these entries
Listen (my actual IP address):80

ServerName (my actual IP address)

DocumentRoot "/usr/local/apache/htdocs" (This directory contains a directory for the web site and a simple index file)

<Directory "/usr/local/apache/htdocs">
#
Options Indexes FollowSymLinks
#
AllowOverride None

Order allow,deny
Allow from all



</Directory>

THEN ACCEPT ALL DEFAULTS UNTIL....

<VirtualHost *>
ServerName DocumentRoot "/usr/local/apache/htdocs/schoolrun.net"
#Other directives etc.....
</VirtualHost>

<VirtualHost *>
ServerName DocumentRoot "/usr/local/apache/htdocs/schoolrun.net"
#Other directives etc....
</VirtualHost>

Clearly I have misunderstood something in the documentation and I would be very grateful for a pointer that will help me out of my current difficulties.

Thanks for reading
Peter
 
Try changing the Listen Directive to:
Code:
Listen 80
And add the missing NameVirtualHost directive:
Code:
NameVirtualHost youripaddress:80
Also add the ip & port identifiers to your VirtualHost containers as well as server aliases:
Code:
<VirtualHost youripaddress:80>
  ServerName [URL unfurl="true"]www.schoolrun.net[/URL]
  ServerAlias schoolrun.net
  DocumentRoot "/usr/local/apache/htdocs/schoolrun.net"
  #Other directives etc....
</VirtualHost>
And lastly, I hope that your post is a typo. Each virtualhost needs a different name and [probably] a different documentroot. See also faq65-1831
 
Thanks very much for your prompt response.
I have tries your direct response with no success but I am now trying a combination of your response and the link you sent. I am sure one will work eventually.
Best regards and have a good week
 
no success in what way? Did you restart the httpd after making the changes? What happens when you try to access the site with the web browser? Is there more than 1 site (virtualhost)?
 
At present there is only one site (but I have more I want to add). I rstarted apache and it starts with no error messages. If I try from the machine that has apache using local host it serves the index file. If I try from another machine it shows the message "connecting to....") and times out
I will mess around some more and post again if I can get a more useful error message
 
That sounds more like a name resolution or firewall problem. If it works from the localhost, the problem is not with apache.
 
Smah is correct, the problem isn't apache.

Is the 'other' machine on the same LAN or is it trying to access your site from an external source?

Try to ping the server and see if that gets through. If not, you might want to try a traceroute to see how far it can go as this will show you where the blockage is.
 
Thanks all.
In fact the first solution did work - the problem was my typing.
Yes the "other machine" is on the same LAN, accessing from another source works fine.
I can only offer a VERY grateful thanks to Norway and smah for your brilliant and timely help.
Thanks and have a great week.
Peter
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top