Please realize that I am truly a very unknowledgable user of linux or
unix or any commands. The problem I am sure is my own fault but I'm not
aware of how I configured it wrong. I basically looked at the
apache.org website and configured the server the way they show in their
examples. I may have missed something. If you have any suggestions,
they will be greatly appreciated.
Here is the error, and here is a copy of how my virtual hosts are setup
in the vhosts.conf file.
--------------------------------
Error in Ktail:
[date] [warn] NameVirtualHost 192.168.1.10:80 has no VirtualHosts
[date] [notice] Apache-AdvancedExtranetServer/1.3.12
(NetRevoluation/Linux-Mandrake) mod_perl/1.22 PHP/3.0.16 configured --
resuming normal operations
-------------------------------------
Vhosts.conf file:
NameVirtualHost 192.168.1.10
<VirtualHost 192.168.1.10>
ServerName www.cypersoft.com
DocumentRoot /home/httpd/html/cypersoft
ServerAlias cypersoft
</VirtualHost>
<VirtualHost 192.168.1.10>
ServerName www.brigabbey.com
DocumentRoot /home/www.brigabbey.com
ServerAlias brigabbey
</VirtualHost>
(I can type in www.cypersoft.com or www.brigabbey.com and get the
respective pages, and thus I find the error misleading.)
Network Chick
Sent via Deja.com http://www.deja.com/
Before you buy.
<VirtualHost 192.168.0.1:80>
.
.
.
</VirtualHost>
SithVixen <sith...@my-deja.com> wrote in message
news:8tkae7$q55$1...@nnrp1.deja.com...
I did try changing <virtualhost 192.168.1.10> to <virtualhost
192.168.1.10:80> and it didn't seem to change the error message.
Heck, at the same time, I even tried changing the NameVirtualHost entry
from NameVirtualHost 192.168.1.10
to
NameVirtualHost 192.168.1.10:80 and even
NameVirtualHost 192.168.1.10:90
and all it did was reflect the change in the error message
[date] [warn] NameVirtualHost 192.168.1.10:80 has no VirtualHosts or
[date] [warn] NameVirtualHost 192.168.1.10:90 has no VirtualHosts
So after, I got that idea of removing these from the vhosts.conf and
putting them instead in the httpd.conf but I still got the same
message.
I know I have missed something somewhere !!!
Kristen
In article <39fe...@pink.one.net.au>,
As soon as I removed the entry
NameVirtualHost 192.168.1.10
and just left in the
<VirtualHost 192.168.1.10:80>
etc etc etc
</VirtualHost>
The error stopped coming up :) Voila!
Thanks for your suggestions anyway!!! Figures that I'd work on it for
a month and as soon as I post for help I'd solve it within minutes.
Hehehehe oh well
Kristen
Huh?
This is what you posted:
<VirtualHost 192.168.1.10>
ServerName www.cypersoft.com
DocumentRoot /home/httpd/html/cypersoft
ServerAlias cypersoft
</VirtualHost>
<VirtualHost 192.168.1.10>
ServerName www.brigabbey.com
DocumentRoot /home/www.brigabbey.com
ServerAlias brigabbey
</VirtualHost>
If you don't use a NameVirtualHost how do you expect Apache to know
which of those virtual hosts to use?
Or are you not really posting your real httpd.conf file?
>nslookup www.brigabbey.com
Name: www.brigabbey.com
Address: 142.59.239.161
> nslookup www.cypersoft.com
Name: www.cypersoft.com
Address: 142.59.239.158
Looks like you weren't posting your real httpd.conf.
--
Bill Moseley
Or they're using NAT. None of our public servers have any idea what their
real-world IP addresses are.
miguel
Yes, but you NAT to a port on the inside. Either you have to specify
different port numbers (or IP numbers) for your IP-based virtual host,
or if your <virtualhost> specify the same IP/port, as in the example
above from the original poster, you need NameVirtualHost.
Apache has to differentiate the hosts by some means.
--
Bill Moseley
Basically I just tell the router which computer to forward port 80 to.
I can change it in a heart beat between the Unix server I'm trying to
set up and the NT server where the pages are temporarily hosted.
I am using a windows2000 box to host the sites until I get the Unix box
working with Apache, Sendmail and the stupid Frontpage extensions.
I did indeed post the real vhosts.conf file. I'm not sure why it was
giving me the error as I am very stupid about Linux and Apache, or why
my doing what I did stopped the problems. I just kept getting that
nasty message until I removed the NameVirtualHost part. If I have made
a serious error, just let me know. It was just that it was the only
thing I could remove that killed the problem.
Here is the error again, and here is a copy of how my virtual hosts are
setup in the vhosts.conf file. Once I removed the NameVirtualHost, the
error stopped coming up in Ktail, and when I typed in the domains, they
came up just fine and showed the seperate "temporary" pages I created
in Linux to differentiate between the two. (The router had been
switched to point at the linux box at the time)
--------------------------------
Error in Ktail:
[date] [warn] NameVirtualHost 192.168.1.10:80 has no VirtualHosts
[date] [notice] Apache-AdvancedExtranetServer/1.3.12
(NetRevoluation/Linux-Mandrake) mod_perl/1.22 PHP/3.0.16 configured --
resuming normal operations
-------------------------------------
Vhosts.conf file:
NameVirtualHost 192.168.1.10
<VirtualHost 192.168.1.10>
ServerName www.cypersoft.com
DocumentRoot /home/httpd/html/cypersoft
ServerAlias cypersoft
</VirtualHost>
<VirtualHost 192.168.1.10>
ServerName www.brigabbey.com
DocumentRoot /home/www.brigabbey.com
ServerAlias brigabbey
</VirtualHost>
-----------
Network Chick
Actually that router would be doing NAT as one of its services in this
case. You're just not doing NAT w/ a linux box.
>
> I did indeed post the real vhosts.conf file. I'm not sure why it was
> giving me the error as I am very stupid about Linux and Apache, or why
> my doing what I did stopped the problems. I just kept getting that
> nasty message until I removed the NameVirtualHost part. If I have made
> a serious error, just let me know. It was just that it was the only
> thing I could remove that killed the problem.
>
> Here is the error again, and here is a copy of how my virtual hosts are
> setup in the vhosts.conf file. Once I removed the NameVirtualHost, the
> error stopped coming up in Ktail, and when I typed in the domains, they
> came up just fine and showed the seperate "temporary" pages I created
> in Linux to differentiate between the two. (The router had been
> switched to point at the linux box at the time)
>
> --------------------------------
> Error in Ktail:
>
> [date] [warn] NameVirtualHost 192.168.1.10:80 has no VirtualHosts
> [date] [notice] Apache-AdvancedExtranetServer/1.3.12
> (NetRevoluation/Linux-Mandrake) mod_perl/1.22 PHP/3.0.16 configured --
> resuming normal operations
>
My only quess at this point is that for some reason apache is
complaining about finding hostnames for those IP's. Do you have an
internal DNS server? If not why don't you add entries into /etc/hosts
for the internal ip and domain names. Make sure your system is doing
host lookups to /etc/hosts first before DNS. I have no idea if this is
what apache is really doing but couldn't hurt to try.
-adam
>
> Actually that router would be doing NAT as one of its services in this
> case. You're just not doing NAT w/ a linux box.
>
> >
> My only quess at this point is that for some reason apache is
> complaining about finding hostnames for those IP's. Do you have an
> internal DNS server? If not why don't you add entries into /etc/hosts
> for the internal ip and domain names. Make sure your system is doing
> host lookups to /etc/hosts first before DNS. I have no idea if this
is
> what apache is really doing but couldn't hurt to try.
>
> -adam
Ok good point. I don't actually have an internal DNS server but I can
always use the temporary NT2000 box and see if it works. Does that
mean I set up Unix in the network settings to point to the 2000 box as
the secondary DNS?
Also how to I make sure my system is doing host lookups to /etc/hosts ?
Kristen
As is so often the case in these long running problems, you were NOT
providing all the details. For example you forgot to mention that you
have not only
NameVirtualHost 192.168.1.10
in you quoted Vhosts.conf file but also in ANOTHER vhosts file or
httpd.conf.
Use only one and your problem will go away.
This is why it went away when you said you deleted the NameVirtualHost
directive. You ended up with one.
Next time when you have a problem like this: Start with a blank
httpd.conf file and only add in the stuff you are working with and see
what happens.
--
Bill Moseley
[..]
> Ok good point. I don't actually have an internal DNS server but I can
> always use the temporary NT2000 box and see if it works. Does that
> mean I set up Unix in the network settings to point to the 2000 box as
> the secondary DNS?
not necessarily, it's fine to point to the unixbox itself, shouldn#t
bother where that dns is as long as you give it a working IP-Address.
>
> Also how to I make sure my system is doing host lookups to /etc/hosts ?
edit /etc/hosts.conf to read:
order hosts bind
multi on
this means that all dns-queries are checked in the /etc/hosts file
first.
Have fun
Niklas
Okay - dumb question then - if I point my web servers to the internal
ethernet address and an outside request comes in, will they still hit the
correct page?
I ask because I'm on a cable connection and I'm playing with three
low-bandwidth domains on my server. The servers gets it's address through
DHCP, and the domains are pointed to me accordingly through a reflector
service. (1 through tzo.com, the other 2 through dyndns.com.)
So far, no matter what domain a person tries to hit they end up getting the
first domain. I know I have no IP address associated with each virtual
domain - mainly because I haven't got a static IP address. If I can point it
to 192.168.0.1 and have it work properly for outside addresses I'll be a
happy camper! :)
Will this work? Help!
Glad I subscribed to this group this morning!
- Dave
-----
Dave Bush <mailto:da...@stny.rr.com>
Visit Shirley & I's web page at http://home.stny.rr.com/davenshirl
<VirtualHost _default_>
DocumentRoot /web/hc
ServerName theholdingcompany.org
</VirtualHost>
<VirtualHost _default_>
DocumentRoot /web/davenshirl
ServerName davenshirl.com
</VirtualHost>
<VirtualHost _default_>
DocumentRoot /web/office
ServerName officeofficials.com
</VirtualHost>
No matter what I do, the theholdingcompany.org's web site comes up. I'm not
running DNS on my server (Red Hat 7.0 with whatever version of apache it
ships with), and I have not edited my /etc/hosts file yet. Right now my
external address is 24.95.156.55, and my internal address is 192.168.0.1.
Tell me what I'm doing wrong guys! What I know about configuring apache is
pretty limited. So far I've been using webmin to help configure it.
Thanks for all the help,
Well, you have three defaults. What is that supposed to mean? When you
configure a default vhost, that's what comes up if nothing else matches.
Apache takes the first one, and ignores the others.
If what you're trying to do is name based virtual hosting, then you need
to tell Apache that it's a name-based virtual host.
<NameVirtualHost 192.168.1.10>
<VirtualHost 192.168.1.10>
ServerName www.poop.com
DocumentRoot /poop
</VirtualHost>
... and so on.
Rich
--
Author: Apache Server Unleashed - www.apacheunleashed.com
Director of Web Application Development - http://www.cre8tivegroup.com/
> So far, no matter what domain a person tries to hit they end up getting the
> first domain. I know I have no IP address associated with each virtual
> domain - mainly because I haven't got a static IP address. If I can point it
> to 192.168.0.1 and have it work properly for outside addresses I'll be a
> happy camper! :)
No. Apache is listening on 192.168.0.1 but a connection come in on a
different IP then Apache won't see it.
1.3.14 has a new feature where you can set up virtual hosts and specify
the IP number as "*" as in
NameVirtualHost *:80
<VirtualHost *:80>
But I'm rather sure you would have to restart httpd when your IP
changes.
--
Bill Moseley
Hey - that even makes sense! :) (That's what I get for being a dummy and
trusting what webmin set up, eh?)
All three domains are up and working now, but I have another dumb question.
I originally had it set up so that the ServerName was set to davenshirl.com
instead of www.davenshirl.com. When the server received the request it
didn't know www.davenshirl.com, so it automatically went to the site I'm
hosting for friends of mine - www.theholdingcompany.org. When I changed the
ServerName to www.davenshirl.com it came up fine.
Is there a way to set it up so that it'd accept both www.davenshirl.com and
davenshirl.com as the same thing? Do I create two virtual hosts with
different server names, or is there a way to link one virtual host to
multiple server names?
Thanks,
- Dave
-----
Dave Bush <mailto:da...@stny.rr.com>
Visit Shirley & I's web page at http://www.davenshirl.com
See the ServerAlias directive in the docs.
--
Joshua Slive
slive...@finance.commerce.ubc.ca
http://finance.commerce.ubc.ca/~slive/