我的 laravel 应用程序不显示任何数据


My laravel application is displaying no data

    ## My laravel application is displaying no data ##
嗨,我

正在使用 laravel 框架开发一个问题应用程序,我遇到了这个问题,我无法弄清楚。 当我键入 mquestions.com 我的服务器只是变成白屏时,没有收到任何数据,当我进行Chrome检查器检查时,我收到500内部服务器错误。尽管我将服务器设置为虚拟主机,而不是在我的开发环境中使用普通的本地主机。这是我对虚拟主机的 Apache 设置/etc/apache2/sites-enabled/000-default-conf这是我设置的

<VirtualHost *:80>
DocumentRoot "/var/www/websiteclient/public/"
<Directory "/var/www/websiteclient/public/">
    Options FollowSymLinks Indexes MultiViews
    AllowOverride All
</Directory>
ServerName mquestions.com
</VirtualHost>

在我的/etc/hosts文件中,这就是我所拥有的,

127.0.0.1   localhost
127.0.1.1   Jobinpal
127.0.1.1   popibay.com
127.0.1.1   billishop.com
127.0.1.1   mquestions.com
127.0.1.1   stackedit
127.0.1.1   phpmyadmin
127.0.1.1   opencart

然后当我在命令行中执行$ sudo apache2ctl restart

AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress this message

此外,我的应用程序/存储已经设置为RW模式。

真诚的我不知道是 laravel 问题还是 apache2 问题,所以争论什么是问题,什么是解决方案。谢谢


我认为您缺少 DirectoryIndex 声明,如下所示(至少,我以这种方式拥有它,到目前为止它正在工作):

<VirtualHost *:80>
    ServerName YOUR_SERVER_NAME
    DocumentRoot YOUR_FOLDER_LOCATION
    DirectoryIndex index.php
    <Directory YOUR_FOLDER_LOCATION>
       AllowOverride all
    </Directory>
</VirtualHost>

希望对您有所帮助!