我从http://httpd.apache.org/download.cgi下载了apache2.2.22 src并进行了安装。安装工作正常。但是当我尝试添加虚拟主机时会出现问题。我添加了2个虚拟主机 1. localhost 2. someother.localhost 两者都指向不同的文档根目录,但是解析为第一个虚拟主机的doc根目录。Apache vhost解析为localhost文件根目录
hereis我的虚拟主机文件,
了NameVirtualHost *:80
<VirtualHost *:80> ServerAdmin [email protected] DocumentRoot "/webserver/htdocs" ServerName localhost ErrorLog "logs/localhost-error_log" CustomLog "logs/localhost-access_log" common </VirtualHost> <Directory /home/sourabhn/somepath> Options FollowSymLinks AllowOverride All Order allow,deny Allow from all </Directory> <VirtualHost *:80> ServerAdmin [email protected] DocumentRoot "/home/sourabhn/somepath" ServerName someother.localhost ErrorLog "logs/someother-localhost-error_log" CustomLog "logs/someother-localhost-access_log" common </VirtualHost>
我已经在hosts文件中的相应条目。我运行的是Ubuntu 11.10机器。请您提出宝贵的建议回到
感谢您的答复..但做同样的力量帮助.. – 2012-04-22 17:09:11