Skip navigation

Setting individual IP addresses for Web testing

1087 Views 21 Replies Latest reply: Nov 4, 2012 10:47 PM by Claude Cauwe RSS
  • MrHoffman Level 6 Level 6 (11,745 points)
    Currently Being Moderated
    Nov 3, 2012 12:17 PM (in response to Claude Cauwe)

    Adding a host into local DNS services does nothing to anything other than adding the DNS translation.  There's no web virtual host instantiated, no network interface is configured, nothing.   Put another way, I don't understand why you've posted that DNS server configuration image.


    As for the response, nslookup and dig ask the default or the specified DNS server for the translation information, and return what was provided by the DNS server.


    If you have configured a host at the specified address and schumantrophy.cauwe.skp.server. isn't working, then you're potentially getting a stale translation from an old address (if the addresses have changed, flush the DNS caches), or you've got a network problem of some ilk.


    With no disrespect to Camelot, configuring multiple IP addresses on the same web host network interface (outside of a few arcane cases) is generally a waste of time and effort and IP addresses.  It's a 1990s IP solution, it only scales if you have unlimited IP addresses (which, yes, is technically the case here), and is an approach that largely fell out of favor shortly after the digital certificate vendors figured out how to sell multiple-domain certificates.  Use virtual hosts.

  • Camelot Level 8 Level 8 (45,680 points)
    Currently Being Moderated
    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.




    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:

    CNAME    macserver.cauwe.skp.server


    This tells clients that the host '' 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 (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 then it will use that site's configuration, otherwise it will use the default site.

  • Camelot Level 8 Level 8 (45,680 points)
    Currently Being Moderated
    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.

1 2 Previous Next


More Like This

  • Retrieving data ...

Bookmarked By (0)


  • This solved my question - 10 points
  • This helped me - 5 points
This site contains user submitted content, comments and opinions and is for informational purposes only. Apple disclaims any and all liability for the acts, omissions and conduct of any third parties in connection with or related to your use of the site. All postings and use of the content on this site are subject to the Apple Support Communities Terms of Use.