【发布时间】:2018-09-20 03:45:32
【问题描述】:
我在窗口 7 上运行了两个 xampp。一个与 php5.6 一起使用,另一个与 php7.2 一起使用。 php7 xampp 的端口号根据article 更改为7777,并且工作正常。我能够运行我的项目。现在的问题是我尝试创建虚拟主机来运行我的 laravel 站点,但它不工作。我得到了
嗯。我们找不到那个网站。
这是我的虚拟主机
<VirtualHost *:7777>
DocumentRoot "C:/xampp/htdocs/"
ServerAdmin admin@localhost
ServerName localhost
<Directory "C:/xampp/htdocs/">
Options Indexes FollowSymLinks
AllowOverride all
Require local
</Directory>
</VirtualHost>
<VirtualHost *:7777>
DocumentRoot "C:/xampp/htdocs/test_web/public/"
ServerAdmin admin@localhost
ServerName test.com
ServerAlias test.com
<Directory "C:/xampp/htdocs/test_web/public/">
Options All
AllowOverride All
Order Allow,Deny
Allow from all
#Options Indexes FollowSymLinks
Require local
# if you want access from other pc's on your local network
#Require ip 192.168.1
# Only if you want the world to see your site
#Require all granted
</Directory>
</VirtualHost>
这是我的主机文件
127.0.0.1:7777 test.com
::7777 test.com
我尝试了很多组合,例如127.0.0.1:7777 与::7777、::1、::77。
【问题讨论】:
标签: php laravel xampp virtualhost host