虚似机配置问题,域名失效. 重启apache没有?原来有几个站点?有没有开mod_vhost?这个配置文件是哪里的?如果是conf/extra/httpd-vhost.conf那么conf/httpd.conf里面有没有Include这个文件? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 这个是在httpd.conf文件的,由于论坛限制字数只能这样放些关键的出来.原来四个站点都没问题,可以正常访问,再加多一个站点就不可以了,配置是一样的.现在我改了下,全部都不正常了,,输入www.o.com,www.f.com 等等访问的都是www.b.com . 输入www.o.com,www.f.com 等等访问的都是www.b.com .都是访问到第一个配置的上去了.. 输入www.o.com,www.f.com 等等访问的都是www.b.com .都是访问到第一个配置的上去了.. <VirtualHost *:80> ServerName localhost DocumentRoot /SNS/public_html/ DirectoryIndex index.html index.php</VirtualHost>类似这样的试试 <VirtualHost>和</VirtualHost>用于封装一组仅施用于特定虚拟主机的指令。任何在虚拟主机配置中可以使用的指令也同样可以在这里使用。当服务器接受了一个特定虚拟主机的文档请求时,它会使用封装在<VirtualHost>配置段中的指令。地址可以是虚拟主机的IP地址; 虚拟主机IP地址对应的完整域名; 字符*,仅与NameVirtualHost *配合使用以匹配所有 的IP地址;或是 字符串_default_,与基于IP的虚拟主机联用以捕获所 有没有匹配的IP地址。 示例<VirtualHost 10.1.2.3>ServerAdmin [email protected]DocumentRoot /www/docs/host.foo.comServerName host.foo.comErrorLog logs/host.foo.com-error_logTransferLog logs/host.foo.com-access_log</VirtualHost> <VirtualHost *:80> ServerAdmin [email protected] DocumentRoot d:/web/root/ ServerName test1 ErrorLog logs/test1_error_log CustomLog logs/test1-access_log common <Directory "d:/web/root/"> Options Indexes FollowSymLinks AllowOverride All Order allow,deny Allow from all </Directory> </VirtualHost><VirtualHost *:80> ServerAdmin [email protected] DocumentRoot d:/web/shop/ ServerName test2 ErrorLog logs/test2_error_log CustomLog logs/test2-access_log common <Directory "d:/web/shop/"> Options Indexes FollowSymLinks AllowOverride All Order allow,deny Allow from all </Directory> </VirtualHost>我的配置,因为我没有申请域名,所以只能在hosts文件里加入127.0.0.1 test1127.0.0.1 test2然后http://test1 http://test2访问正常. PHP页面无法进入,点击进入则用DW8打开 由于套接字没有连接并且没有提供地址,发送或接收数据的请求没有被接受。 问下基础问题,用jquey写select 下拉框 并以 option的值做为form 的action来submit 可跳转出现问题 请各位大虾来帮帮忙 关于从数据库中按条件抓出并显示数据执行效率的问题 在一家小企业做网站有发展吗 求PHP判断数据为null时输入空数据 一个有挑战的数组问题 感谢朋友们的鼓励,明天去上班,散分!! php base64与java(android)base64 有误差 求解决方案 APACHE设置 exec() 的使用问题 一个非常难搞的循环(很急)
这个是在httpd.conf文件的,由于论坛限制字数只能这样放些关键的出来.原来四个站点都没问题,可以正常访问,再加多一个站点就不可以了,配置是一样的.现在我改了下,全部都不正常了,,输入www.o.com,www.f.com 等等访问的都是www.b.com .
输入www.o.com,www.f.com 等等访问的都是www.b.com .都是访问到第一个配置的上去了..
输入www.o.com,www.f.com 等等访问的都是www.b.com .都是访问到第一个配置的上去了..
ServerName localhost
DocumentRoot /SNS/public_html/
DirectoryIndex index.html index.php
</VirtualHost>类似这样的试试
虚拟主机IP地址对应的完整域名;
字符*,仅与NameVirtualHost *配合使用以匹配所有 的IP地址;或是
字符串_default_,与基于IP的虚拟主机联用以捕获所 有没有匹配的IP地址。
示例
<VirtualHost 10.1.2.3>
ServerAdmin [email protected]
DocumentRoot /www/docs/host.foo.com
ServerName host.foo.com
ErrorLog logs/host.foo.com-error_log
TransferLog logs/host.foo.com-access_log
</VirtualHost>
<VirtualHost *:80>
ServerAdmin [email protected]
DocumentRoot d:/web/root/
ServerName test1
ErrorLog logs/test1_error_log
CustomLog logs/test1-access_log common
<Directory "d:/web/root/">
Options Indexes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost><VirtualHost *:80>
ServerAdmin [email protected]
DocumentRoot d:/web/shop/
ServerName test2
ErrorLog logs/test2_error_log
CustomLog logs/test2-access_log common
<Directory "d:/web/shop/">
Options Indexes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>我的配置,因为我没有申请域名,所以只能在hosts文件里加入
127.0.0.1 test1
127.0.0.1 test2然后http://test1 http://test2访问正常.