[英]xampp with a specified port number not working with virtualhost
我正在尝试为我的 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>
稍微更改文件
Listen 8081
<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>
在这里阅读更多: https://httpd.apache.org/docs/trunk/vhosts/examples.html#port
这是/etc/hosts
。 它不接受端口,应该看起来像: mydomainname.test 127.0.0.1
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.