Forum Moderators: phranque

Message Too Old, No Replies

vhost configuration

Cant get my virtual hosts working as desired....

         

jim_knopf

12:19 am on Jan 10, 2006 (gmt 0)

10+ Year Member



Hi there,

I'm new here and thats a little longer description to give as much info as I can. As well sorry about my poor english writing, aint my first language.

Until last week I used and wamp package called "webserv" and changed now to Apache 2 TRIAD

I have 40+ websites on LAN second machine (WINDOWS XP SP2) with 3 network connections ( 1 on motherboard, 2 networkcards)
I asigned the networkcards static IP's

All my websites on that server I have made reachable with vhost like in example:

<VirtualHost 192.168.1.233:80>
ServerName www.example.com
ServerAlias example.com 192.168.1.233.example.com
DocumentRoot "F:/kixs/apache2triad/htdocs/lansites/example"
</VirtualHost>

Hostfiles I did configure so it works on all my LAN computers and I can call all websites by typing the .home URL's with no problems.

No I like to add more and thats where I get lost ( since 3 days... :-) )

I did get myself dynamic dns service by DynDNS and 2 hostnames. I like to configure the additional vhosts so that all remains as it is PLUS I can call 2 sites from the internet.mazatlan.example.net + sinaloa.example2.com.

I did create 2 folders in htdocs (kick and sinaloa), set the router so the port 80 gets forwarded to the 2 static IP networkcards 192.168.1.233 and 192.168.1.244
and did as in the DynDNS tututotial <snip>\

<VirtualHost *>
ServerName mazatlan.example.net
ServerAlias *.mazatlan.example.net
DocumentRoot "F:/kixs/apache2triad/htdocs/kick/"
</VirtualHost>

<VirtualHost *>
ServerName sinaloa.example2.com.
ServerAlias *.sinaloa.example2.com.
DocumentRoot "F:/kixs/apache2triad/htdocs/sinaloa"
</VirtualHost>

( well many other configs now...., Ip instead * and, and, and)

How can I configure that I can call the 2 hosts from the internet ( or evtl. more in future) and still keep the LAN / www.whatever.home as it function now

Thanks for any advise or pointer where to find more information for none-pro's.... ;-)

Saludos from an German living in Mexico trying to write english...

[edited by: jdMorgan at 1:08 am (utc) on Jan. 10, 2006]
[edit reason] No URLs, please. See Terms of Service. [/edit]

jdMorgan

5:36 pm on Jan 11, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



If I understand your question, just set up additional local-IP-based virtual hosts, and point them to the same document root as the domain names.

Jim

jim_knopf

5:58 pm on Jan 11, 2006 (gmt 0)

10+ Year Member



I did try that and I end always up with the same, the "home" html and not the page I have in the path....