RE: Recommended way to setup Virtual Host

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



It's very simple to setup NameBase Virtual Host in Apache:

Like we have server with 10.0.0.1 IP which should serve over port 80 and we want to setup Apache for domains abc.com and xyz.com. Follow below given notes.

Add following lines in httpd.conf file:

NameVirtualHost 10.0.0.1:80

<VirtualHost 10.0.0.1:80>
ServerName abc.com
DocumentRoot /path/to/doc/root
CustomLog /path/to/create/access/log/for/abc_access.log common
</VirtualHost>

<VirtualHost 10.0.0.1:80>
ServerName xyz.com
DocumentRoot /path/to/doc/root
CustomLog /path/to/create/access/log/for/xyz_access.log common
</VirtualHost>

Reload Apache. This should work. ;-)

Thanks,
Manoj

Date: Mon, 7 Jun 2010 12:20:43 +0500
From: nasir381@xxxxxxxxx
To: users@xxxxxxxxxxxxxxxx
Subject: Recommended way to setup Virtual Host

Hi,

Can anyone tell me the recommended way to setup Virtual Host with one Physical IP on the server and multiple domains. ?

Name Based Virtual Host Vs IP Based Virtual Host what is the best to choose/

Regards
Nasir 


Manage your finance and manage money through MSN Money Special Drag n' drop

[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux