|
开放虚拟主机服务
提供类似 xxxx.myhost.com之类的虚拟主机
在apache里面相关设置如下 (ip及域名为随意填写)
LogFormat "%v %l %u %t \"%r\" %>s %b" vcommon
<VirtualHost 202.38.11.111:80>
ServerAdmin no@21cn.com
ServerName vhost.myhost.com
VirtualDocumentRoot /usr/server/www/vhost/%2/%1
CustomLog logs/vhost.myhost.com-access_log vcommon
</VirtualHost>
然后在vhost.myhost.com-access_log里面显示的是类似下面的日志
vhost.myhost.com - - [10/Apr/2003:21:08:54 +0800] "GET /forum/dorado/forum_r6_c5.jpg HTTP/1.1" 304 -
而非真实的xxx.myhost.com 请问怎么配置apache令可以显示xxx.myhost.com而非显示vhost.myhost.com???? |
|