xammp部署多个站点、部署laravel项目

来源:互联网 发布:java中set集合的用法 编辑:程序博客网 时间:2024/05/22 06:15

网站还在搞,就本地搞了虚拟主机

开启xammp的Apache。打开C:\Windows\System32\drivers\etc下的hosts文件,在文件的最底部添加你需要的虚拟域名


打开xammp的安装位置(我的是E:\xampp\apache\conf),打开E:\xampp\apache\conf的httpd.conf,找到其中<Directory /></Directory>,修改为

<Directory />
Options FollowSymLinks
AllowOverride None
Order deny,allow
allow from all
</Directory>

然后打开E:\xampp\apache\conf\extra下的httpd-vhosts.conf的编辑如下

<VirtualHost *:80>
    DocumentRoot "E:\git\Pinocchio\Pinocchio\public"
    ServerName pinocchio.website
    ErrorLog "logs/laravelapp-error.log"
    CustomLog "logs/laravelapp-access.log" common
</VirtualHost>

DocumentRoot 是的laravel的项目的位置。因为laravel的入口文件是public文件夹下的index.php文件。

ServerName是你在C:\Windows\System32\drivers\etc下的hosts文件设置的虚拟域名

0 0
原创粉丝点击