留着以后可能有用...目前用IIS来配置虚拟机主机,貌似很简单..2003直接建立网站,然后在IP地址高级中,输入主机头就是如 user.sample.com 这样的二级域名..这样多个域名都指向一个IP,使用一个80端口但是不同域名访问不同的网站...
apache的比较conf.需要打开脚本来配置的...
<VirtualHost *:80>
ServerAdmin webmaster@name.com
ServerName
DocumentRoot /home/wwwroot/www/
ErrorLog /tmp/logs/www_error_log
CustomLog /tmp/logs/www_access_log common
</VirtualHost>
<VirtualHost *:80>
ServerAdmin test@name.com
ServerName test.name.com
DocumentRoot /home/wwwroot/test/test1/
ErrorLog /tmp/logs/test_error_log
CustomLog /tmp/logs/test_access_log common
</VirtualHost>
<VirtualHost *:80>
ServerAdmin movie@name.com
ServerName movie.name.com
DocumentRoot /home/wwwroot/movie/
ErrorLog /tmp/logs/movie_error_log
CustomLog /tmp/logs/movie_access_log common
</VirtualHost>
|
阅读(2244) | 评论(0) | 转发(0) |