Unoffical empeg BBS

Quick Links: Empeg FAQ | RioCar.Org | Hijack | BigDisk Builder | jEmplode | emphatic
Repairs: Repairs

Topic Options
#289359 - 05/11/2006 23:14 Need Apache help!
SonicSnoop
addict

Registered: 29/06/2002
Posts: 531
Loc: Triangle, VA
Hey guys, was wondering if some of you linux gurus out there could give me a hand.. I was trying to configure my linux box to do 2 differnt web sites and ended up messing it up, so instead of trying to fix my mess i said screw it and downloaded the newest ver of ubuntu (6.10) server edition and installed it clean while installing the LAMP (which i have to say is the easiest install of apache, mysql and php ive ever done ) and as far as i can tell the default apache site works. now my problem comes in that i have 2 domains lets just say domain1.com and domain2.com I would like apache to be setup where both domains have thier own dir under /var/www like /var/www/domain1.com and /var/www/domain2.com which i have seen alot of tutorials out there and have tried to follow. Now my question is this, my box is behind a firewall/router and uses a 192.168.0.x address, How do i get it so when someone types in domain1.com and my port forwarding sends port 80 to my server it knows to give them /var/www/domain1.com and not domain2.com? As it stands now DNS wise I have a program called DirectUpdate that runs on my windows box and updates my domains with my routers IP address.. Is what im trying to do possible? Is there a good walkthrough/tutorial out there someone could point me too? ive looked through a bunch but does exactly walk me through all what im trying to configure or im just not understanding some of it.. It has been a while since I have tried to mess with this so im a little rusty Thanks for your patience..
_________________________
-D Modifying and Tweaking is a journey, not a destination................................ MKIIa : 60gig - 040103286 - Blue - v2 + PCATS tuner MKIIa : 20gig - 040103260 - Blue - v3a8 + Mark Lord Special Edition Cherry Dock

Top
#289360 - 05/11/2006 23:45 Re: Need Apache help! [Re: SonicSnoop]
matthew_k
pooh-bah

Registered: 12/02/2002
Posts: 2298
Loc: Berkeley, California
The keyword you're probably looking for is "name based virtual host". There are two ways to do virtual hosts in apache, one being based on the IP address, and the other based on the name of the web page the browser requests. Very old browsers (we're talking mosaic) might not have supported name based virtual hosts, I don't recall. The only real reason these days to not use them is https sites have to have their own IP address. The short answer is to just forward port 80, and have both domain names point to your public IP. Then configure apache correctly, and everything should work fine.

If you need more help, post what it's doing specifically, I'm sure someone can help.

Matthew

Top
#289361 - 06/11/2006 00:21 Re: Need Apache help! [Re: matthew_k]
SonicSnoop
addict

Registered: 29/06/2002
Posts: 531
Loc: Triangle, VA
Thank you, I was able to get it working by reading the page for name based virtual host on apache's site and remembering some of the other items i read on other sites. Thank you very much!!
_________________________
-D Modifying and Tweaking is a journey, not a destination................................ MKIIa : 60gig - 040103286 - Blue - v2 + PCATS tuner MKIIa : 20gig - 040103260 - Blue - v3a8 + Mark Lord Special Edition Cherry Dock

Top
#289362 - 06/11/2006 01:38 Re: Need Apache help! [Re: SonicSnoop]
matthew_k
pooh-bah

Registered: 12/02/2002
Posts: 2298
Loc: Berkeley, California
Cool, glad you got it working.

Matthew

Top