Whil - a tip - don't drink beer when configuring stuff! John
-----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Whil Hentzen (Pro*) Sent: Monday, December 04, 2006 8:18 PM To: [email protected] Subject: Re: [NF] Two NICs in a single PC => two IPs, right? SOLVED! Hi folks, I've got this working, so I thought I'd share the love and tell you what I did, how I did it, including those pesky commas and semi-colons, and such. This will go into the archives and mebbe help someone else down the road... 1. I've got this nifty (that's French for Stupid) cable modem on a 'nifty' Time-Warner line. Biz-class something or other. This box has four Ethernet ports in the back. The T-W rep tells me that only one is active, and that I'll need a router to hook more than one machine to the box. He lied, but that's sorta besides the point. 2. Along with the no-name black box they installed, I got a couple of IP addresses. Let's call them 1.2.3.100 and 1.2.3.101. 3. I've stuck an Ethernet cable into one of the ports on the modem. The other end of the Ethernet cable is stuck into a box running Fedora Core 6 and Apache 2 as a Web server. 4. I want to host MyBigFatDomain.com on 1.2.3.100 and MyStupidLittleDomain.com on 1.2.3.101. Why? Because I want to see if I can. It's edge-you-kay-shun-ull. 5. In FC6, open up the Network Configuration applet via F | Administration | Network. In the Devices tab (the default), you'll see your network card displayed with a name like "eth0". (Possibly more than one if you've got those fancy wireless doo-dads and such...) I've only got one card cuz I'm a 90's kind of guy. Actually, cuz my machine is a 90's kind of machine. This eth0 device is bound to an IP like 1.2.3.100. Make sure the 'eth0' line is highlighted, then click the "Copy" button in the toolbar at the top. You'll now get a second entry named something like "eth0Copy0". Highlight the 'eth0Copy0' entry, click the "Edit" button, and change the IP address for it to 1.2.3.101 (your second IP address.) Make sure it's active via the Activate button. Save. Now you've got two external IPs bound to one physical card. Bitchin'. 6. Make sure there are actually directories for the domains: /var/www/html/mybigfat /var/www/html/mystupidlittle and put a couple of index.html files in there. To make sure you're getting the right one, name one of them index100.html and the other index101.html, and put different content (like the actual domain name) in each. Don't just use "sample index file" because you won't be able to tell if you're getting to the right domain or not. /var/www/html/mybigfat/index100.html /var/www/html/mystupidlittle/index101.html 7. As root, in the Apache config file (in FC6, it's /etc/httpd/conf/httpd.conf), tell Apache to use virtuals by enabling the following line: #NameVirtualHost *:80 You enable it by removing the "#" in front of the line. 8. Next, create a virtual domain for MyBigFatDomain.com: <VirtualHost 1.2.3.100:80> ServerAdmin [EMAIL PROTECTED] DocumentRoot /var/www/html/mybigfat DirectoryIndex index100.html ServerName www.mybigfatdomain.com ErrorLog logs/www.mybigfatdomain.com-error_log CustomLog logs/www.mybigfatdomain.com-access_log common </VirtualHost> The clever trick about the "1.2.3.100:80" comes from Ted Roche. Everyone all together now: Thanks, Ted! 9. Next, create another virtual domain, this time for MyStupidLittleDomain.com (note the change from '100' to '101'): <VirtualHost 1.2.3.101:80> ServerAdmin [EMAIL PROTECTED] DocumentRoot /var/www/html/mystupidlittle DirectoryIndex index101.html ServerName www.mystupidlittledomain.com ErrorLog logs/www.mystupidlittledomain.com-error_log CustomLog logs/www.mystupidlittledomain.com-access_log common </VirtualHost> 10. Restart Apache,either through the F | System | Services GUI tool or via the command line: #> service httpd restart 11. Now you can navigate to www.mybigfatdomain.com, and you should see the contents of index100.html, and then to www.mystupidlittledomain.com and index101.html should display. Voila! Whil [excessive quoting removed by server] _______________________________________________ Post Messages to: [email protected] Subscription Maintenance: http://leafe.com/mailman/listinfo/profox OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.

