Click to See Complete Forum and Search --> : Apache + 1 IP + 3 Domains = HELP!


Toky
10-05-2002, 12:50 PM
Hi, i'm about to start hosting 2 Domains on my Server, but i'm not sure how to go about it.

1- I've made user accounts for all domains
2- I've created the \public_html folder
3- What now?

I know it can be done, but i'm not sure how to make each domain to its specific account.
ie "www.domain1.com ---> http://myIP/~domain1/public_html"

please help i need to have this figured out before the 15th of Oct.

i'm using Mandrake 9 on:
Abit BP6 (yes BP6!) w/ 2 celerons 466Mhz @ 581Mhz
512 pc100 Ram
2 WD 60GB on ide 1
1 "el cheapo" CD-R on IDE 2
Viper 770
1 Nic NetGear 10/100 (PCI) as eth 1
1 Nic SMC 10 (PCI)as eth 0

bdl
10-05-2002, 12:56 PM
Virtual Domains (http://httpd.apache.org/docs/vhosts/virtual-host.html)

Toky
10-06-2002, 07:54 AM
Thanks alot

blizz
10-06-2002, 02:24 PM
Hi,

As bdl mentioned if you have one static ip address you could simply use Named Virtual Hosting for numerous websites within your apache httpd.conf file.

For Example:

# Virtual host domainone.com

<VirtualHost 72.96.52.127>
DocumentRoot /home/domainone/www/
ServerAdmin support@domainone.com
ServerName domainone.com
ServerAlias www.domainone.com
ScriptAlias /cgi-bin/ /home/domainone/cgi-bin/
</VirtualHost>

Of course your nameservers or dns zone files will need to be modified as well.

Good luck,
blizz

baz2
10-06-2002, 05:29 PM
Originally posted by blizz
Hi,

As bdl mentioned if you have one static ip address you could simply use Named Virtual Hosting for numerous websites within your apache httpd.conf file.

For Example:

# Virtual host domainone.com

<VirtualHost 72.96.52.127>
DocumentRoot /home/domainone/www/
ServerAdmin support@domainone.com
ServerName domainone.com
ServerAlias www.domainone.com
ScriptAlias /cgi-bin/ /home/domainone/cgi-bin/
</VirtualHost>

Of course your nameservers or dns zone files will need to be modified as well.

Good luck,
blizz

Can you tell my you have ServerName as "domainone.com" and not "www.domainone.com"? Isn't ServerName whatever domain name is used in the host header?

I'm asking because I'm having my own problem with virtual hosting, and the more I understand, the more likely I am to get to the root of my problem.

blizz
10-06-2002, 06:50 PM
Hi,

I use this combination in my virtual host containers so that my domains will answer with or without the www prefix.

/
ServerName domainone.com
ServerAlias www.domainone.com
/

Regards, blizz