Click to See Complete Forum and Search --> : apache V-host what am i doing wrong


Zane217
09-02-2003, 06:07 PM
Hi, I am well on my way to setting up apache 2.0.47
I Have 2 dyn. dns. from DynDns.org

Zane217.homeip.net
Zane217.homelinux.com

when i point my browser to
http://zane217.homeip.net it shows up correct
when i go to
http://zane217.homelinux.com it shows up correct
I think these two are found on my network not over the internet

when i goto
http://www.zane217.homeip.net it is correct
when i goto
http://www.zane217.homelinux.com i get the page for zane217.homeip.net

I know that the first page in your v-host is the default so i think that is where i am getting the incorrrect page from but how do i fix it.

here is the v-host part of my httpd.conf


#
# Use name-based virtual hosting.
#
NameVirtualHost *

#
# VirtualHost example:
# Almost any Apache directive may go into a VirtualHost container.
# The first VirtualHost section is used for requests without a known
# server name.
#

<VirtualHost *>
DocumentRoot /home/web-pages/test1
ServerName zane217.homeip.net
</VirtualHost>

<VirtualHost *>
DocumentRoot /home/web-pages/test2
ServerName zane217.homelinux.com
</VirtualHost>





#<VirtualHost *>
# ServerAdmin webmaster@dummy-host.example.com
# DocumentRoot /www/docs/dummy-host.example.com
# ServerName dummy-host.example.com
# ErrorLog logs/dummy-host.example.com-error_log
# CustomLog logs/dummy-host.example.com-access_log common
#</VirtualHost>

as you can see from the web pages i am just in the testing stages. they will be up today 9/2/03 and tommorow 9/3/03 you can try them out. or just hack into my box. its all going to be erased and i will start fresh anyway. thanks for your help.
Gary

Zane217
09-02-2003, 06:32 PM
just realized some more info may be helpfull
I am running slackware 9.0
I have a linksys router with the slackware computer in a DMZ, and the port is forwarded as well.
I need to change my sig. :)
gary

freemansweb
09-02-2003, 07:22 PM
I've not used apache 2 yet but in 1 you need a 'ServerAlias' directive within your vhost directive, like below:

<VirtualHost *>
DocumentRoot /home/web-pages/test1
ServerName zane217.homeip.net
ServerAlias www.zane217.homeip.net
</VirtualHost>

Another possiblity is that your DNS A-Record doesn't have an entry for the subdomain www.

BTW I tried the links and it seems that your server was down.

Zane217
09-02-2003, 07:46 PM
thanks ill try it but it seems i have bigger problems. I still get the same results from my end so now i am thinking it might be a router problem. can you ping me and let me know if you get something back. my ip is
24.151.10.118.
thanks.

freemansweb
09-02-2003, 08:10 PM
Ping timed out. What model router do you have? If it's a Linksys go to 'advanced' 'forwarding' and set it up. Or set your computer as a DMZ host temporarily for troubleshooting purposes.

Zane217
09-02-2003, 08:43 PM
linksys model is NR041 it is basicly the cheap version of there standard stackable 4 port gateway router and hub. I think it is not working properly. that computer is in a DMZ and the port is forwarded as well thansk for the help but i think it is now a hardware problem that i have to look at.
Gary

freemansweb
09-02-2003, 09:01 PM
I've got a linksys 11s4 and had a similar problem sometime ago. If it was working previously (able to connect from outside your network), see if it is using a different network ip now. If so clear your dhcp leases and/or restore it to factory defaults.

Good Luck!