Apache加VirtualHost后通过IP无法正确访问

Standard

问题:
之前在apache上配了svn和trac是通过IP进行访问.
现在要加了个VirtualHost,加完后发现原IP访问的DocumentRoot无法访问.

解决方法:
在vhost的配置中加上

<VirtualHost *:80>
ServerName 127.0.0.1
DocumentRoot /home/apache/htdocs
</VirtualHost>

One thought on “Apache加VirtualHost后通过IP无法正确访问

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.