我正在尝试为xampp项目创建本地域名
但是dns无法解析,无法正确重定向。
/主机/等
127.0.0.1:8081 mydomainname.test
虚拟主机
<VirtualHost *:8081>
DocumentRoot "C:/xampp/htdocs/sam"
ServerName mydomainname.test
ServerAlias mydomainname.test
<Directory "C:/xampp/htdocs/sam">
Options Indexes MultiViews FollowSymLinks
AllowOverride All
Order Deny,Allow
Allow from all
Options All
Require all granted
</Directory>
</VirtualHost>
2条答案
按热度按时间gv8xihay1#
稍微修改一下文件
在此阅读更多信息:www.example.comhttps://httpd.apache.org/docs/trunk/vhosts/examples.html#port
bn31dyow2#
它是
/etc/hosts
。它不接受端口,应该如下所示:mydomainname.test 127.0.0.1