Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/248.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 此apache2.4和laravel设置的合适虚拟主机是什么?_Php_Apache_Laravel_Vhosts - Fatal编程技术网

Php 此apache2.4和laravel设置的合适虚拟主机是什么?

Php 此apache2.4和laravel设置的合适虚拟主机是什么?,php,apache,laravel,vhosts,Php,Apache,Laravel,Vhosts,我有一个内部站点,我称之为eaglets。我用它来托管一堆javascript计算器等等。我想使用laravel应用程序,并使地址看起来像http://eaglets/playground 我的var/www/html目录中有游乐场文件夹,这是我的默认文档根目录 如果我把一个虚拟的index.html放在我的var/www/html/playway/文件夹中,然后转到http://eaglets/playground,结果很好。这让我相信我的vhost没有正确地指向var/www/html/pl

我有一个内部站点,我称之为
eaglets
。我用它来托管一堆javascript计算器等等。我想使用laravel应用程序,并使地址看起来像
http://eaglets/playground

我的
var/www/html
目录中有游乐场文件夹,这是我的默认文档根目录

如果我把一个虚拟的
index.html
放在我的
var/www/html/playway/
文件夹中,然后转到
http://eaglets/playground
,结果很好。这让我相信我的vhost没有正确地指向
var/www/html/playerd/public
文件夹

这是我的虚拟主机文件:

  1 <VirtualHost *:80>
  2
  3         ServerName eaglets/playground
  4         ServerAlias eaglets/playground
  5         DocumentRoot /var/www/html/playground/public
  6         <Directory /var/www/html/playground/public>
  7                 Options -Indexes +FollowSymLinks +MultiViews
  8                 AllowOverride All
  9                 Require all granted
 10         </Directory>
 11
 12         ErrorLog ${APACHE_LOG_DIR}/playground-error.log
 13         CustomLog ${APACHE_LOG_DIR}/playground-access.log combined
 14
 15 </VirtualHost>

我有相同的用例,这里是配置(名称和路径更改为您的):


服务器名小鹰
Alias/Playery/var/www/html/playery/public
选项如下符号链接
允许超越所有
    VirtualHost configuration:
*:80 is a NameVirtualHost
default server eaglets (/etc/apache2/sites-enabled/000-default.conf:1)
port 80 namevhost eaglets (/etc/apache2/sites-enabled/000-default.conf:1)
port 80 namevhost eaglets/playground (/etc/apache2/sites-enabled/playground.conf:1)
alias eaglets/playground
ServerRoot: "/etc/apache2"
Main DocumentRoot: "/var/www"
<VirtualHost *:80>
    ServerName eaglets
    Alias /playground /var/www/html/playground/public

    <Directory /var/www/html/playground/public>
        Options FollowSymLinks
        AllowOverride All
    </Directory>
</VirtualHost>