Home Forums OS X Server and Client Discussion Web Setting up Websites at multiple domains on one server

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #356780
    steeveevee
    Participant

    I’m at my wit’s end. I’ve been trying to get several Web sites hosted on the same server for weeks now. I just can’t decipher Mac OS X Server set-up.

    I’ve played with Workgroup Manager, Server Settings, NetInfo Manger. I just want the server to handle traffic coming to domain1.com from one account on my G4 tower, and to handle traffic coming to domain2.org from a different account. Does it have to be so hard, so confusing? Someone please point me to a hold-your-hand simple guide to doing this.

    == Steve

    #356793
    Camelot
    Participant

    The best advice I can offer is:

    Ignore the GUI admin apps and do it manually.

    The admin apps are not capable of building virtual hosts other than name-based virtual hosts, which is OK, but it will only set them up if the reverse DNS for the hostname (as far as this machine is concerned) points to the machine itself.

    This means that if you’re trying to setup http://www.somecompany.com as a virtual host using the GUI tool, ‘www.somecomany.com’ MUST resolve to the IP address of this machine, bearing in mind NAT/load balancing private class addresses, etc.

    Instead, learn Apache’s httpd.conf format and do it yourself. You’ll find the flexibility of this approach way beyond the limited options supported by the GUI tools.

    For the virtual hosts setup, check http://localhost/manual/vhosts/index.html for the apache documentation.

    #356808
    steeveevee
    Participant

    I’m afraid my problem was more basic than what you guys are talking about. I couldn’t make heads or tails of the collection of utilities that together manage OS X Server: Workgroup Manager, Macintosh Manager, Server Settings, Server Status, NetInfo Manager, etc.

    For example, I was surprised to discover that when I created a new user account remotely, it didn’t automatically create a home directory. Call me spoiled from too many years of using systems where the new-user scripts did that automatically, but that flummoxed me for a while.

    Another thing was this whole idea of “share points.” Talk about confusing. I couldn’t tell whether I had to specify the path or not; I couldn’t tell whether I needed to make a share point for each account, or whether they could all share one, or whether an individual’s user should be a share point, or the directory that user’s home directory was contained in. It may seem kind of churlish to people who are accustomed to Unix, but to someone accustomed to Macintosh, this was new turf.

    The good news is, I think I’ve figured out some of the problem. I have succeeded in setting up several domain names hosted from the same server. Now I’m having trouble getting the server to let me log in using certain of the new accounts I’ve set up. Some let me in fine, others say user/password error, even when they worked an hour ago.

    I’d consider upgrading to Panther…if it didn’t cost *another* $500.

    == Steve

    #356810
    Camelot
    Participant

    [quote:cca351a516=”MacTroll”]I’m not quite sure what you’ve run into with the GUI…[/quote:cca351a516]

    Maybe my needs are somewhat different from a ‘typical’ Mac OS X Server user, Troll.

    As a background, I run large (some, very large) web sites on a farm of servers sitting behind a load balancer. Each machine has a private class address, not real-world address (the load balancer takes care of all IP address issues).

    Currently my production servers are all Solaris/SPARCs but we’re evaluating Mac OS X Server.

    The first issue I run into is that I currently run port-based virtual hosts. There is zero support in the GUI for port-based virtual hosts, only name-based.

    If I want to use the GUI and use name-based virtual hosts, the GUI tool will *only* let you setup a virtual host for, say, http://www.domain.com if the reverse DNS for http://www.domain.com resolves to the IP address of this machine.
    That might be OK if I’m running on one machine that’s not NAT’d, but, guess what? since I’m behind the load balancer, it doesn’t.

    So now I have to futz with hosts files on each machine (no, I can’t use split DNS or NetInfo because, as far as my network is concerned, http://www.domain.com *is* 192.168.1.1, 192.168.1.2 and 192.168.1.3 at the same time. The GUI can’t deal with that. bzzzzt.)

    The actual intent of name-based virtual hosts as far as Apache is concerned is to match the HOST: header in the HTTP request to one of the virtual hosts. There’s nothing in the Apache docs that say the hostname has to match the machine’s IP, so Apple are wrong in requiring that.

    It’s not a huge problem for me. Coming from Solaris I’m used to manually editing httpd.conf, so that’s OK. I’m sure the GUI is OK for low-end/simple configs. Mine isn’t, and it highlights flaws in the GUI app that IMHO shouldn’t be there for anyone.

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.

Comments are closed