我在Laravel 5中遇到了一些問題。我在我的服務器上安裝了PHP和Apache,我用作曲者安裝了Laravel composer create-project laravel/laravel foldername
,但是我嘗試訪問瀏覽器中的/ public文件夾,看到一個白頁,開發日誌說500內部服務器錯誤。Laravel白頁500內部服務器錯誤
在我的Apache錯誤日誌,我有以下: [Mon Aug 31 19:19:15.855570 2015] [:error] [pid 23556] [client 10.0.2.2:58505] PHP Fatal error: Uncaught exception 'UnexpectedValueException' with message 'The stream or file "/var/www/test/storage/logs/laravel.log" could not be opened: failed to open stream: Permission denied' in /var/www/test/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php:87\nStack trace:\n#0 /var/www/test/vendor/monolog/monolog/src/Monolog/Handler/AbstractProcessingHandler.php(37): Monolog\\Handler\\StreamHandler->write(Array)\n#1 /var/www/test/vendor/monolog/monolog/src/Monolog/Logger.php(289): Monolog\\Handler\\AbstractProcessingHandler->handle(Array)\n#2 /var/www/test/vendor/monolog/monolog/src/Monolog/Logger.php(565): Monolog\\Logger->addRecord(400, Object(Symfony\\Component\\Debug\\Exception\\FatalErrorException), Array)\n#3 /var/www/test/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php(49): Monolog\\Logger->error(Object(Symfony\\Component\\Debug\\Exception\\FatalErrorException))\n#4 /var/www/test/app/Exceptions/Handler.php(33): Illuminate\\Foundation\\Exceptions\\Handler->report(Object(Symfony\\Component\\Debug\\Ex in /var/www/test/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php on line 87 [Mon Aug 31 19:19:22.865065 2015] [:error] [pid 23557] [client 10.0.2.2:58507] PHP Fatal error: Uncaught exception 'UnexpectedValueException' with message 'The stream or file "/var/www/test/storage/logs/laravel.log" could not be opened: failed to open stream: Permission denied' in /var/www/test/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php:87\nStack trace:\n#0 /var/www/test/vendor/monolog/monolog/src/Monolog/Handler/AbstractProcessingHandler.php(37): Monolog\\Handler\\StreamHandler->write(Array)\n#1 /var/www/test/vendor/monolog/monolog/src/Monolog/Logger.php(289): Monolog\\Handler\\AbstractProcessingHandler->handle(Array)\n#2 /var/www/test/vendor/monolog/monolog/src/Monolog/Logger.php(565): Monolog\\Logger->addRecord(400, Object(UnexpectedValueException), Array)\n#3 /var/www/test/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php(49): Monolog\\Logger->error(Object(UnexpectedValueException))\n#4 /var/www/test/app/Exceptions/Handler.php(33): Illuminate\\Foundation\\Exceptions\\Handler->report(Object(UnexpectedValueException))\n#5 /var/www/test/vendor/laravel/framework/src/Illuminate/ in /var/www/test/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php on line 87
我有像20或在我的日誌或多或少相同entrys 30。
我設定的權利: chown -R :www-data /var/www/test
chmod -R 755 /var/www/test
chmod -R 777 /var/www/test/storage
任何想法如何,我可以得到Laravel和運行? (宅基地不可能用於我的項目)
什麼是對'的/ var/WWW設置當前權限/測試/存儲/日誌/ laravel.log'?做一個'ls -al/var/www/test/storage/logs/laravel.log'。 – jszobody
'chmod -R 777/var/www/test/storage/logs /'怎麼辦? – MozzieMD
777不會改變任何東西。在我的文件夾中沒有laravel.log,日誌文件夾爲空 –