phpstudy中apache的默认根目录的配置

  默认配置文件是:vhosts.conf。

  安装laravel后需要把根目录配置到public。

<VirtualHost _default_:80>
DocumentRoot "C:\phpStudy\PHPTutorial\WWW\public"
    ServerName localhost
    ServerAlias localhost
  <Directory "C:\phpStudy\PHPTutorial\WWW\public">
#下面被注释的代码,用“localhost”访问时会禁止访问
#Options -Indexes -FollowSymLinks +ExecCGI Options FollowSymLinks ExecCGI AllowOverride All Order allow,deny Allow from all Require all granted </Directory> </VirtualHost> <VirtualHost *:80> DocumentRoot "C:\phpStudy\PHPTutorial\WWW\public" ServerName www.gohosts.com ServerAlias gohosts.com <Directory "C:\phpStudy\PHPTutorial\WWW\public"> Options FollowSymLinks ExecCGI AllowOverride All Order allow,deny Allow from all Require all granted </Directory> </VirtualHost>

 

上一篇:phpStudy 升级 MySQL 到 5.7.21


下一篇:有关测试PHPStudy及使用站点域名创建虚拟主机