VirtualHost: Difference between revisions

From KlavoWiki
Jump to navigationJump to search
(New page: The term Virtual Host refers to the practice of running more than one web site (such as www.company1.com and www.company2.com) on a single machine. Virtual hosts can be "IP-based", meaning...)
 
No edit summary
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
http://httpd.apache.org/docs/2.2/vhosts/
The term Virtual Host refers to the practice of running more than one web site (such as www.company1.com and www.company2.com) on a single machine. Virtual hosts can be "IP-based", meaning that you have a different IP address for every web site, or "name-based", meaning that you have multiple names running on each IP address. The fact that they are running on the same physical server is not apparent to the end user.
The term Virtual Host refers to the practice of running more than one web site (such as www.company1.com and www.company2.com) on a single machine. Virtual hosts can be "IP-based", meaning that you have a different IP address for every web site, or "name-based", meaning that you have multiple names running on each IP address. The fact that they are running on the same physical server is not apparent to the end user.
<br><br>
<br><br>
Line 8: Line 11:
<pre>
<pre>
<VirtualHost *:80>
<VirtualHost *:80>
    ServerName dummy-host.example.com
    DocumentRoot /www/docs/dummy-host.example.com
</VirtualHost>
</pre>
Addational paramaters
<pre>
    ServerAlias domain.tld *.domain.tld
     ServerAdmin webmaster@dummy-host.example.com
     ServerAdmin webmaster@dummy-host.example.com
    DocumentRoot /www/docs/dummy-host.example.com
    ServerName dummy-host.example.com
     ErrorLog logs/dummy-host.example.com-error_log
     ErrorLog logs/dummy-host.example.com-error_log
     CustomLog logs/dummy-host.example.com-access_log common
     CustomLog logs/dummy-host.example.com-access_log common
</VirtualHost>
</pre>
</pre>


[[Category : Linux]]
[[Category : Linux]]

Latest revision as of 02:09, 21 November 2010

http://httpd.apache.org/docs/2.2/vhosts/


The term Virtual Host refers to the practice of running more than one web site (such as www.company1.com and www.company2.com) on a single machine. Virtual hosts can be "IP-based", meaning that you have a different IP address for every web site, or "name-based", meaning that you have multiple names running on each IP address. The fact that they are running on the same physical server is not apparent to the end user.

/etc/httpd/conf/httpd.conf

NameVirtualHost *:80
<VirtualHost *:80>
    ServerName dummy-host.example.com
    DocumentRoot /www/docs/dummy-host.example.com
</VirtualHost>

Addational paramaters

    ServerAlias domain.tld *.domain.tld 
    ServerAdmin webmaster@dummy-host.example.com
    ErrorLog logs/dummy-host.example.com-error_log
    CustomLog logs/dummy-host.example.com-access_log common