Configuring Multiple Web Sites with single IP on web server running Snow Leopard

Joined
Mar 8, 2010
Messages
1
Reaction score
0
Points
1
So how do I go about doing that? I have three sites I want to host on a single server with one IP. What is the actual settings on the server running Snow Leopard that directs the traffic to the site?

Thanks for any help.
 
Joined
Dec 16, 2009
Messages
6
Reaction score
0
Points
1
I've been searching this same thing all night. I ordered a Mac Mini I plan to host multiple sites on. I don't have it yet so I haven't gotten to try this, but the instructions at this link look promising. I know it's for xserve but I think it's all the same.

Optimizing an Xserve for Web Hosting
 
Joined
Dec 16, 2009
Messages
6
Reaction score
0
Points
1
I looked more closely and it looks like the link I posted previously applies to the server edition of OS X. The regular version requires the same steps, but is more manual. You need to manually edit the httpd.conf file (in /private/etc/apache2) by uncommenting line 465: "Include /private/etc/apache2/extra/httpd-vhosts.conf". Then add virtual host information to vhost.conf (in /private/etc/apache2/extra). Here's an example of virtual host info copied from Apache's website:

<VirtualHost 10.1.2.3>
ServerAdmin [email protected]
DocumentRoot /www/docs/host.foo.com
ServerName host.foo.com
ErrorLog logs/host.foo.com-error_log
TransferLog logs/host.foo.com-access_log
</VirtualHost>

Restart Apache by turning web sharing on/off in System Prefs and it should go.

This is to add multiple domains behind the same IP, you also have the option to create multiple IPs (though I don't know how that works). Also, this is for Snow Leopard (and possibly Leopard), if you're running a slightly older version I think the only difference is that vhost.conf is included in httpd.conf.

Let me know if you have any luck!
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top