0
我正在嘗試將虛擬主機配置到/ opt/lampp/htdocs的子目錄中。這是在httpd-vhost.conf文件:在lampp中配置localhost和virtalhost在儀表板中的重定向
NameVirtualHost *:80
<VirtualHost localhost:80>
ServerAdmin localhost
DocumentRoot /opt/lampp/htdocs
ServerName localhost
<Directory /opt/lampp/htdocs>
Options All
AllowOverride All
Allow from all
</Directory>
</VirtualHost>
<VirtualHost *:80>
# This first-listed virtual host is also the default for *:80
ServerName www.localhostwmf.com
ServerAlias localhostwmf.com
DocumentRoot /opt/lampp/htdocs/wmf
DirectoryIndex index.php
<Directory /opt/lampp/htdocs/wmf>
Options All
AllowOverride All
Allow from all
</Directory>
</VirtualHost>
我註釋掉這一行的httpd.conf:
Include etc/extra/httpd-vhosts.conf
而且我加入etc/hosts文件以下行:
127.0.0.1 www.localhostwmf.com
但它總是在xampp的儀表板頁面中重定向我!預先感謝您的答案!