Thats what I thought and actually proceeded under that assumption, but
then started poking around other areas when it did not work. Hmmm. I
have obviously boned apache in some way. Oddly I seem to have broken my
breadcrumbs on my main site with this... yet everything else runs OK.
My main domain is simply being forwarded by registeryour.ca, which saved
me any DNS hassle, but I want to get posfix and mailman working with
vhosts as well, so I will need to figure bind out. But you say I can
ignore bind for the apache part and thats good news. One thing at a time
works for me! :-)
The second domain has real name servers assigned to it because
registeryour.ca's forwarding service seems to be broken for new domains
and they have yet to trace the fault (but thank me for my patience in
the matter ;)).
You know, I do not think I ever registered this machine as a host on
this new IP, only the domain... did we not have to do that back in the
day? Gaa, DNS has been a black pit of despair for years ;-)
This is what I have in vhost.conf (the mandrake way is to include the
section as a different file).
<VirtualHost 192.168.10.2>
ServerName www.myservername.net
DocumentRoot /var/www/html
</VirtualHost>
NameVirtualHost 192.168.10.2
<VirtualHost 192.168.10.2>
ServerName www.myvirtualhost.com
DocumentRoot /home/user/public_html
</VirtualHost>
It is configured this way as it seems to be the only way it wants to
work for both, at least locally. If I leave the main one out, the second
overrides my main site. Then, if I use the NameVirtualHost directive
prior to the first entry, httpd, when restarted, complains that one will
override the other, and only the first is to be used.
Substituting the external IP cause the sites to not be displayed locally.
Common directives seem to all be sane (as far as I can tell) and all the
usual modules are installed and work OK.
Thanks again.
Scy
Bill Strosberg wrote:
sberaud wrote:
Hello.
I am slowly adding domains and returning my sites back into active
status after neglecting them for a while due to replacing my Linux
based home built router with a wireless mortorla/firewall DSL router
and not having a clue how to configure it properly and thus only had
the machine-name based domain working via the static IP for the last
6 months or so (10Mbit was getting long in the tooth).
My main server box is Mandrake 9.1. It is this way because it is one
of the few available distros that will run well on an old AMD350 with
256mb pc133, have a decent GUI and export VNC with some degree of
performance.
I was playing with Ubuntu (wow Debian that works ;)) on my desktop
and like it a lot. I am just nor sure it will run all that well on an
old 350 as xorg and 2.6 level kernels are a dog by comparison to
Xfree86 on 2.4 on the box (it slows to a crawl when VNC runs), but
given the hoops I am jumping through to try to get the problems
sorted out it might be worth it, if server based things work as well
as the stuff I looked at for the desktop.
The other server is 2.4 ghz AMD with WinXP32, and provides
cross-platform web development services in the form of IIS, MySQL and
MSSQL. It is not forwarded to via the router directly, and is pretty
much sandboxed.
Both servers are headless and my workstation is Win x64/SuSE x64
(10.0), hence the need for VNC.
The router is a Motorola 802.11G DSL router with 4 port hub. It
contains a built in DHCP server and what appears to be a DNS
responder. Sadly it runs ASP. It has a host name set by me to play
nice with the others as part of the primary domain.
The router sits on a static external IP and maintains a private
internal subnet with one connected machine being allowed as a
"virtual server" and is port-forwarded to automatically by the
router. I have some control of the procedure, but most of it is Greek
to me..
So the problem here is a combination of ignorance and ignorance.
Being used to having my router and DNS/Web servers as part of the
same Linux box, making virtual hosts and domains was not actually all
that hard.
Now that I have the DSL router, configuring the port forwarding and
then using BIND to run the other domains has been, err... problematic.
I think.
I am not sure because things are sorta working, sorta not, and the
way its not is confusing the heck out of me.
So first question:
Apache and bind: Vhosts
In order to get both the primary host domain and additional vhosts to
work, what set of IPs do I use, the external or internal, when
configuring "A" records in bind and NamedVirtualHosts in Apache to
get the outside world to see both domains when the name server is
being forwarded to and the machine ip is on a private subnet and is
different from the declared (registered) "host"?
As mentioned it sorta works, as some people can see the sites from
the outside and some not. I used the internal subnets. in the configs.
I realize there may not be much here for anybody to go on, so if
clarification is required, I will be happy to provide it.
T.I.A.
S.
_______________________________________________
Linux mailing list
Linux [ at ] lists [ dot ] oclug [ dot ] on [ dot ] ca
http://www.oclug.on.ca/mailman/listinfo/linux
Name based virtual hosts do not require any trickery on the part of
Bind at all. Apache looks at the page request coming in on port 80,
and then Apache handles the re-direction of the hosts to the
particular parts of the filesystem designated in your httpd.conf (or
whatever isotope you run).
Internal IP addresses should NEVER be visible outside the firewall.
Do not configure Bind to advertise internal IP addresses outside the
firewall.
Basically, as long as your router can re-direct all requests to port
80 to ONE internal IP address, Apache will handle the rest. Please
remeber that multiple SSL/TLS servers will NOT work with this scheme.
Hope this helps.
--
Bill Strosberg