【发布时间】:2014-06-27 13:04:40
【问题描述】:
我添加到 C:/windows/system32/drivers/etc/hosts:
127.0.0.1 mywebiste
并在 httpd-vhosts.conf 中添加:
<VirtualHost *:80>
ServerAdmin webmaster@dummy-host2.example.com
DocumentRoot "C:/xampp/htdocs/mywebiste"
ServerName mywebsite
ErrorLog "logs/error.log"
CustomLog "logs/access.log" common
<Directory "C:/xampp/htdocs/mywebiste">
Options Indexes FollowSymLinks Multiviews
Options -Indexes
AllowOverride None
Order allow,deny
allow from all
#RedirectMatch ^/$ / index.php
Options +FollowSymLinks
IndexIgnore */*
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . index.php
</Directory>
</VirtualHost>
现在,当我想将新网站添加到主机文件和 httpd-vhosts.conf 时,它会呈现“mywebsite”并且我无法访问该网站,即使我删除了 httpd-vhosts.conf 中的虚拟主机并从中删除了我的条目主机文件它仍然呈现“我的网站”。我不知道该怎么做才能解决这个问题?
【问题讨论】:
标签: apache virtualhost