Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
573 views
in Technique[技术] by (71.8m points)

apache - Error in exception handler. - Laravel

It's a Laravel-install related question. I have a public-facing Unix server setup:

<VirtualHost *:80>
ServerAdmin [email protected]
DocumentRoot "/var/www/mydomain"
ServerName mydomain.org
ServerAlias www.mydomain.org
ErrorLog "/var/log/mydomain.org-error_log"
CustomLog "/var/log/mydomain.org-access_log" common
</VirtualHost>

I can serve documents fine out of /var/www/mydomain i.e. http://mydomain.org/test.php with test.php containing:

<?php echo 'test';

works fine.

In bash, with Laravel installed through Composer and looking at the files:

# ls /var/www/mydomain/my-laravel-project

.gitattributes  CONTRIBUTING.md artisan         composer.json   phpunit.xml readme.md       vendor
.gitignore      app             bootstrap       composer.lock   public          server.php

So when I browse to:

http://mydomain.org/my-laravel-project/public/

why does my application report:

Error in exception handler. 

in the browser - on a blank white screen? I'm expecting to see the Laravel splash screen.

Moreover, the log files don't reveal anything either.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

The safer option would be to change the group of the storage directories to your web servers group (usually apache or www-data, but this can vary between the different operating systems) and keep the permissions as of the directory as 775.

chgrp -R www-data app/storage

Or with chown.

chown -R :www-data app/storage

Then make sure directory permissions are 775.

chmod -R 775 app/storage

From the Laravel web site:

Laravel may require one set of permissions to be configured: folders within app/storage require write access by the web server.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...