Forum Moderators: travelin cat

Message Too Old, No Replies

Virtual hosting on OS X 10.3.4 Server?

         

misteraven

1:27 pm on Jul 17, 2004 (gmt 0)

10+ Year Member



Hello all!

I just bought my first xServe and am in the process of migrating the first of many Red Hat linux webservers over to this platform. I confidently know my way around linux from the CLI, and generally rely on this and occassionaly webmin to do my deed. As excited as I am with this new server, I'm totally lost. The directory structure is so far removed from what I'm used to, I can't tell which way is up. The remote admin tool is great, but it's also feeling foreign and many configuration options seem to be missing.

I'm trying to setup several name based virtual hosts, and a single IP based virtal host (with SSL). Normally, I prefer setting up individual users on the system for each site, with the sites contents (cgi-bin, htdocs, logs) stored within the users home directory. This keeps everything nice and organized and makes it easy to restrain/dump each user into the correct directory upon logging in. Obviously, I wouldn't want 'www.domain.com/~user' type url's, and prefer to keep the address streamlined regardless of the protocol used. In other words, I'd like my setup to be www.domain.com, ftp.domain.com, ssh user@domain.com for each site.

That said, can anyone point me to a guide/tutorial or drop some knowledge on how this would be best done. If I create a share point at '/Library/WebServer/Documents' and then create a directory named after each user_name in there, I could then specify that as the person's home folder. However, it makes more sense to me to simply create the home folders in '/Users/user_name' like they belong and simply change the virtual host container so the default document root reflects this path instead. Ultimately, I guess either would work, but before I go at it blind, I was hoping to learn which was the correct way, and why?

Thanks for the help.

gfguthrie

3:06 pm on Jul 18, 2004 (gmt 0)

10+ Year Member



Apple's got some nice docs, if you haven't seen them:

[developer.apple.com...]

misteraven

3:30 pm on Jul 18, 2004 (gmt 0)

10+ Year Member



Thanks for the link. I read a pdf witht he same info, and is part of why I asked the question. In that document, they suggest using Apache's default document root to serve virtual hosts from, as well as explain how to configure you're system to log all virtual hosts to the same log file. Personaly, I'd like to do neither. I prefer to have each site own it's own log, as well as let each user serve their own site from their home folder. I believe it's a much neater method of organizing users and virtual hosts, but wanted to get an authoritative answer to make sure I'm not missing something. I'd assume Apple would have a good rerason for recommending their specific set up. Now I'd just like to know what that reason is.

Thanks.

BjarneDM

3:57 pm on Jul 18, 2004 (gmt 0)

10+ Year Member



There's no specific reason for Apple to recommend those specific solutions. As far as I can see, they are just explaining various solutions you can find in the Apache documentation. As far as I see it, you are quite free to implement the solution that serves you best. In my opinion, there's no 'correct' way to host multiple domains.

Having said that, I too am in favour of separating everything on a user basis: I separate *everything* out: php-includes, mysql, cgi-scripts ... are on a server by server basis.

The disadvantage of the ways recommended in the article is that the granular control you can have over each virtual server by giving each one a separate httpd.conf is lost.

timster

1:15 pm on Jul 20, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I'd assume Apple would have a good rerason for recommending their specific set up. Now I'd just like to know what that reason is.

When you set up websites for multiple users, you can choose to keep all the websites together, or to keep all the data for a particular user together. The second way makes it easier for the user to find his webserver if he's logged in (i.e., using) his computer, and that jibes with Apples ease-of-use philosophy.

Just my 2¢: I'd suggest following Apple's guidelines here, as most tutorials, etc., on OS X Web servers will assume you do.