how to config apache2 at local network

any1 know how to config apache so i can use my domain name at my web browser ?


here is what i am trying to do:

i need to host a number of web sites at my mac, for example: hostone.com, hosttwo.com, hostthree.com and etc

since i need to host more than one website at one same IP, i use name based virtual hosts

so i have hostone.com at 192.168.0.1:1234 and a servername of "hostone"

hosttwo.com at 192.168.0.1:1235 with a server name of "hosttwo"

and etc


my question is , how do i config my local settings, so when i type "hostone.com" at my browser it will give me hostone.com and "hosttwo" at my browser it will give me hosttwo.com


Thanks

Posted on Jun 24, 2011 9:47 PM

Reply
4 replies

Jun 25, 2011 10:41 AM in response to allen999

Set up your local DNS server with the domains you want to use on your network, and then set up Apache virtual hosts to process those domain names as the requests from the web browsers arrive at your web server.


Getting from www.example.com to example.com via mod_rewrite and URL rewriting (and a 301 or 302 redirect), or via Server Admin and its capability to permit you to have web site aliases. It's also possible to set this up via CNAME (alias) entries in your local DNS server definitions, as described in one of the articles listed above.


I'd suggest using registered domains, as that avoids problems if/when you start operating with the rest of the Internet, and particularly when you're accepting in-bound requests for your web server from the Internet.


I'd also suggest configuring your network out of the 192.168.0.0/24 and 192.168.1.0/24 subnets now, as (when you get around to needing them) VPN connections need IP routing and IP routing doesn't work well when you have the same IP subnet on both ends of the VPN connection. It's usually easier to change this earlier rather than later. Look to change this to some other private subnet within the 192.168.0.0/16 block, or into subnet in the 172.16.0.0/12 or 10.0.0.0/8 blocks.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

how to config apache2 at local network

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.