7 months ago

Deployment 500 Error: Debian9, Apache2

Posted 7 months ago by aj-php


I created a new vanilla Debian9 server (small VPS).

I installed apache, php7.2 and mariadb.

I also installed LetsEncrypt CertBot, and was able to acquire the https certificate.

I asked CertBot to redirect all users hitting http over to https.

I then installed composer, and laravel.

I was able to create a new laravel application.

The root is /var/www/example.com/html (the laravel application is in here).

The owner and group of that directory is apache's www-data user/group.

I then went over into the apache site configuration



And modified both those files to have the DocumentRoot:

DocumentRoot /var/www/example.com/html/public

My problem is that if I visit the website, I get a 500 error from Laravel. I do get the nice Laravel 500 error page (the current landscape is a desert.).

In the laravel logs:


If we open the log file in there (just one at the moment), we have at the top:

[2019-02-09 19:16:18] production.ERROR: No application encryption key has been specified. {"exception":"[object] (RuntimeException(code: 0): No application encryption key has been specified. at /var/www/example.com/html/vendor/laravel/framework/src/Illuminate/Encryption/EncryptionServiceProvider.php:44)

Mm... Any idea what I can check?

Please sign in or create an account to participate in this conversation.