logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: virtual host stopped working
Author
bbxrider



Joined: 24 Feb 2007
Posts: 27
Location: stocktown ca

PostPosted: Wed 25 Jul '07 2:33    Post subject: virtual host stopped working Reply with quote

honest i didn't touch it
running this on xppro, apache 2.2.4
i had 3 vhosts working fine and now only the 'virtualhostbase' passthru to a zope server works
i can ping the other 2 virtualhost domains ok, so getting to my router ok.
there are no error messages either in my apache error log or the error logs for the 2 virtual sites that don't come up
i tested that if i address my browser with just "localhost" it will bring up the first virtual site in httpd.conf, literally the first one coded there, i can switch them to have either one come up.
no matter what order they are in, the 'virtualHostBase' (to zope) virtual host always comes up
any ideas what might have gone wrong and yes i have done an xp reboot
bbxrider
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7298
Location: Germany, Next to Hamburg

PostPosted: Wed 25 Jul '07 15:28    Post subject: Reply with quote

Did you put the hostnames in in hosts file or do you use IP based hosts?
Back to top
bbxrider



Joined: 24 Feb 2007
Posts: 27
Location: stocktown ca

PostPosted: Wed 25 Jul '07 16:41    Post subject: Reply with quote

ah, ip based hosts, and i have an entry for the job1data.com domain, 127......., so that explains why that domain comes up locally and not the other one, so either something in my .conf or xp is blocking remote access ?
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7298
Location: Germany, Next to Hamburg

PostPosted: Thu 26 Jul '07 10:12    Post subject: Reply with quote

The question is: Do you have any DNS server? If not Browsers from the internet can resolve the name to the IP.
Check if your server is reachable from the internet you can try:
telnet _external_IP_ 80

e.g.
telnet 212.55.33.11 80
Back to top
bbxrider



Joined: 24 Feb 2007
Posts: 27
Location: stocktown ca

PostPosted: Thu 26 Jul '07 20:49    Post subject: Reply with quote

yes i have a dns server, i assume that has been working all along since i have been able to ping, but i have found i spoke too soon
turns out i can access all sites ok externally, again they are all virtual host
what is frustrating and hard to understand is the apache machine access and lan access
from apache machine
-'localhost' and apache machine lan addr serves up the first site in the virtual host list
-the only domain url that comes up is the proxy pass to zope
-there are entries in my hosts file for 127.0.0.1 for all domain names
from a pc on my lan
-no domain names get served
-local lan address does not get served, i'm not getting the actual error as a frustrating people pc page comes up
-telnet to domain_name 80='couldn't open a connection to host.....'
-telnet to lan addr ie 192.... 80=hang, unless i type in login, then get 'IETF//DD HTML 2.0............your browser sent a request this server could not understand....

isn't there some .conf settings that would allow access both from the apache machine and other machines on the local lan??
t hanks for your replies, this is not so straightforward
bob
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7298
Location: Germany, Next to Hamburg

PostPosted: Sun 29 Jul '07 16:38    Post subject: Reply with quote

For your local PC You can to 2 things. Edit the hosts file in C:\WINDOWS\system32\drivers\etc
like

Code:

127.0.0.1 localhost
127.0.0.1 vhost1.domain.tld
127.0.0.1 vhost2.domain.tld


Second thing is that you set your router or networkcard to use the DNS sever which knows the domain name and your vhosts.

Maybe you setup a DNS server on your apache machine which all others use to resolve the IP's so they could see the vhosts.
Back to top
bbxrider



Joined: 24 Feb 2007
Posts: 27
Location: stocktown ca

PostPosted: Mon 30 Jul '07 22:43    Post subject: Reply with quote

thanks, for your help
i did have entries for domains with 'www' but not without, e.g.
i had
127.0.0.1 www.mydomain.com
but not
127.0.0.1 mydomain.com
and i already had 127.0.0.1 localhost
so that explains some weird behavior with seeming to resolve sporadically. now with all the entries in hosts, it works ok

not sure what you mean by this:
-second thing is that you set your router or networkcard to use the DNS sever which knows the domain name and your vhosts
-my router gets its url via dhcp and it is also provisioned with the the url for a dns server for the router gateway
Back to top


Reply to topic   Topic: virtual host stopped working View previous topic :: View next topic
Post new topic   Forum Index -> Apache