Apple Event: May 7th at 7 am PT

Newsroom Update

Beginning in May, a special Today at Apple series titled “Made for Business” will offer small business owners and entrepreneurs free opportunities to learn how Apple products and services can support their growth and success. Learn more >

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Setting individual IP addresses for Web testing

Dear all,


I recently purchased an old MacMini to do some Web-application testing in a more convenient way than using a remote server.

Because the MacMini is a rather old model (first Core 2 Duo model), I installed MacOS 10.6.6 SnowLeopard Server on it.


I am, however, facing troubles to get it do what I wish.


The IP address of the machine is : 192.168.1.42


I wish it to respond to the following addresses :


192.168.1.100 for website svenskaklubben.be

192.168.1.101 for website schumantrophy.eu

192.168.1.102 for website sky-project.com


Etc ...


These sites do not have to be accessible from the outside : they are LAN only for testing.


The default configuration with only one site works perfectly, but things do change when I add several websites.


When I setup the zones in the DNS part of the server, the best result I can achieve is that a trace (or ping) on the name returns the IP correctly.

But when I ping (or trace) the IP, it always says : "host not found", or "host down"


Most probably, I do mess up somewhere.

Any help to guide me step-by-step would be highly appreciated, since I'm working on this since a couple of days and start to loose my nerves :-)


Lots of thanks in advance

iMac 24, Mac OS X (10.7.2), SpeedTouch Router, 802.11g, Nikon D80, PBG4 1.33 and iPad 3G/32

Posted on Oct 30, 2012 5:00 AM

Reply
21 replies

Nov 3, 2012 11:22 PM in response to MrHoffman

dear both,


i don't know what the best or the most modern solution would be.

Actually, i wouldn't really care if the solution was state-of-the-art or slightly old-fashioned, if I already could have a working solution ! 😕


i have put a DNS screnshot to show where I was.


Starting from there, what do i need to do to establish a virtual host, hoping that it will work ? (Host name ? IP address ? Host description ?)


txs

Nov 4, 2012 12:26 AM in response to Claude Cauwe

At this point you have two options:


a) Use distinct IP addresses for each site and use IP-based virtual hosts


b) Use the same IP address for each site and use name-based virtual hosts.


Both are equally valid, with 'name-based' being slightly more 'modern', especially since all the servers are on a private LAN anyway.


So:


Option a:


Go to System Preferences -> Network on your server and create additional interfaces on the same physical interface (e.g. 'Built-in Ethernet') as your existing address.

For each interface, set its IP address to the new address you selected and entered in DNS. This is what will enable ping and traceroute to your server - just adding the name in DNS doesn't do diddly.


Then In Server Admin, add/edit your site. For the IP address, choose the newly-created IP address. This is what binds the site to that address, so that Apache knows to serve this site when requests come in on this IP address.


Option b:


In DNS, change the new sites' host entry to a CNAME (alias) instead of an 'A' record. Set the record's value to the name of your server, e.g:


svenskaklubben.be CNAME macserver.cauwe.skp.server


This tells clients that the host 'svenskaklubben.be' is really the same as 'macserver.cauwe.skip.server'.


Now, in Server Admin, add/edit the site configuration for this site and set the servername to svenskaklubben.be (or whatever's appropriate) and leave the IP address as Any.


Now Apache will look at the hostname of any incoming request and match it to the configured sites - if a request comes in for svenskaklubben.be then it will use that site's configuration, otherwise it will use the default site.

Nov 4, 2012 1:45 AM in response to Camelot

Dear Camelot,



I chose option A, as this is easier to store many sites along each other for development purposes.

Thanks for this clear explanation - indeed I was missing the additional Ethernet connections.


Now, everything works as expected ! Thanks a zillion - and have a nice Sunday.




Thanks too to MrHoffmann who made me realize how complex things could be, even if they look simple !

Nov 4, 2012 10:40 AM in response to Claude Cauwe

FTP is completely disconnected from web services. FTP access is based on the user account that logs in and isn't related to the IP address or the hostname that the user connects to.


If you really, really need FTP (check because it's really something you should try to avoid) then it's a matter of setting the access rights so that specific user accounts have access to the corresponding site's DocumentRoot.

Setting individual IP addresses for Web testing

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