--spy 2012-05-06
apache安装好后的一些配置
用户组的变更
User web
Group web
出错提示信息
ServerAdmin you@example.com
映射到的物理路径:
DocumentRoot "/data0/htdocs"
此处为配对信息
<Directory "/data0/htdocs">
最末尾应该包含
Include conf/extra/httpd-vhosts.conf
静态配置
修改配置文件/usr/local/webserver/apache/conf/extra/httpd-vhosts.conf
NameVirtualHost *:80 --切记加入该信息否则不映射多地址
需要在物理目录下建立对应的bbs和www文件夹 内建不同的index.html
<VirtualHost *:80>
ServerAdmin nothingisok@qq.com
DocumentRoot "/data0/htdocs/bbs"
ServerName bbs.spy.com
ErrorLog "/data0/logs/bbs.spy.com-error_log"
CustomLog "/data0/logs/bbs.spy.com-access_log" common
</VirtualHost>
<VirtualHost *:80>
ServerAdmin eitherisok@qq.com
DocumentRoot "/data0/htdocs/www"
ServerName www.spy.com
ErrorLog "/data0/logs/www.spy.com-error_log"
CustomLog "/data0/logs/www.spy.com-access_log" common
</VirtualHost>
如果本机验证的话可在C:\WINDOWS\system32\drivers\etc\hosts
文件中加入相关信息