这是我在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