如何在Windows上使用XAMPP设置本地域?

时间:2016-03-13 10:13:27

标签: apache xampp localhost virtualhost

这是我在httpd-vhosts.conf文件中所做的更改   localhost的代码

<VirtualHost *>
    DocumentRoot "D:\xampp\htdocs"
    ServerName localhost
</VirtualHost>

我的域名代码:

<VirtualHost *:800>
        ServerAdmin postmaster@myshop.local
        DocumentRoot "D:\ampp\htdocs\myshop.local\www"
        ServerName myshop.local
        ServerAlias www.myshop.local
        <Directory "D:\xampp\htdocs\myshop.local">
        Order allow,deny`enter code here`
        Allow from all
        </Directory>
    </VirtualHost>

我需要使用myshop.local而不是localhost !!!     所以在主机中我做了以下但仍无法通过任何方式访问它        浏览器:

  127.0.0.1   localhost
     127.0.0.1  myshop.local
     127.0.0.1  www.myshop.local

0 个答案:

没有答案