虚拟主机在wamp或xampp中的不同端口

时间:2014-05-22 04:28:40

标签: apache port virtualhost

我熟悉使用默认端口的虚拟主机。刚刚默认端口80被另一个程序占用。那么,是否可以创建具有类似81或83之类的自定义端口的虚拟主机。

刚才,我必须使用http://localhost:81/phpmyadmin调用phpmyadmin,但我无法创建另一个项目http://test.local以下是我在某些文件中使用的代码。在我问这里之前,我谷歌,但没有解决方案!

httpd-vhosts.conf file

NameVirtualHost *:81
  <VirtualHost *:81>
    DocumentRoot "D:\wamp\www\test"
    ServerName test.local
  <Directory "D:\wamp\www\test">
        Allow from all
    </Directory>
  </VirtualHost>



hosts file
127.0.0.1:81       car.local


httpd.conf file
Listen 81

那么,我如何才能获得http://test.local这样的网址。我在我的电脑上安装了wamp和xampp。

0 个答案:

没有答案