美文网首页
Linux xampp 配置tp虚拟主机

Linux xampp 配置tp虚拟主机

作者: 霡霂976447044 | 来源:发表于2020-02-26 15:19 被阅读0次

开启虚拟主机配置include

sudo vim /opt/lampp/etc/httpd.conf

# Virtual hosts
Include etc/extra/httpd-vhosts.conf

编写虚拟主机配置

sudo vim /opt/lampp/etc/extra/httpd-vhosts.conf

<VirtualHost *:80>
    ServerName www.test1.com
    DocumentRoot /home/baloneo/PhpstormProjects/WechatPHP/public
    <Directory "/home/baloneo/PhpstormProjects/WechatPHP/public">
        DirectoryIndex index.html index.htm index.php
        Options Indexes FollowSymLinks
        AllowOverride None
        Require all granted
        allow from all
        Order allow,deny
   </Directory>
</VirtualHost>

注意Require all granted需要加上,不然会403

关闭已有的nginx等冲突服务

sudo systemctl stop nginx.service

设置tp的runtime目录为777

cd your/thinkphp/project/path
rm -rf runtime
mkdir runtime
chmod 777 runtime

相关文章

网友评论

      本文标题:Linux xampp 配置tp虚拟主机

      本文链接:https://www.haomeiwen.com/subject/roivchtx.html