PDA

View Full Version : multiple web sites


cwalcott
02-27-2002, 12:29 PM
I am trying to set up multiple web sites using the default apache install and the server admin interface.

My first attempt was to create a second ethernet port to a different ip address. This is how it's done on windows. My understanding is that this is NOT how you do it on OSX. When I tried to create a second site in server admin based on this second ethernet port, the check box for the site would never stick.

Then, a friend told me to just create a second web site and assign the same IP address to it. He said this is a virtual host that goes by the domain name instead of the IP. I set up my DNS to have two of my domains assigned to the same IP address. I then created a second site in the server admin program. Problem was, the web server stoped working. I tried restarting it many times but it would never start up. I checked the /var/logs/httpd/error_log file and found this at the end:

[Tue Feb 26 20:24:35 2002] [warn] NameVirtualHost 192.168.1.2:16080 has no VirtualHosts
[Tue Feb 26 20:24:35 2002] [crit] (48)Address already in use: make_sock: could not bind to address 192.168.1.2 port 16080

So, I turned off the second site in server admin and the web server started up fine.

Clearly I am not doing this right. Can anyone point me to directions on how to do this?

Thanks!

- chris walcott

thorptech
02-20-2007, 07:23 PM
Hi Chris

I'm trying to do the same thing and I haven’t had any luck either.

I want to setup our server two host two independent websites. With one external ip address, but two different domain names.

acme.mail.order
02-20-2007, 10:52 PM
Scrap everything in the web admin panel, confirm that the base install works properly and start fresh. Adding an additional site through Server Admin should be a 2 minute process. If you are doing things manually through httpd.conf make sure you do things The Apple Way. Although The Apache Way will work just fine you will have to give up using the GUI tools. For example, I'm running DNS on my server, with views. Server Tools doesn't support views so the plugin crashes when I try to view the DNS pane.

Do both of you have DNS running for/on your server, and do you have suitable working DNS for each site you want to run? If not, go to http://www.dyndns.com and get a free account. Virtual hosts does NOT function without a fully-qualified domain name.

The normal hosting company way is with virtual hosts using the listen directive, but the servers are configured for multiple (sometimes hundreds) of IP addresses on the same interface. OSX Server will do this but not through Server Admin.

And it looks like you are using the web performance cache (port 16080 ). Unless you are running a very busy webserver you will definitely want to disable this option.