S
S
Sergey Burduzha2021-11-12 21:04:09
Laravel
Sergey Burduzha, 2021-11-12 21:04:09

Why doesn't laravel work after cloning?

Just started learning Laravel.
At work, successfully installed via composer.
Installed php 8.
Practiced a bit.

At home, I cloned the repository into this
t83KRSW.png

Nginx config folder.

server {
        listen 80;
        listen [::]:80;

        root /var/www/laravel_projects/oop.local/public;
        index index.html index.htm index.nginx-debian.html;
        error_log  /var/log/nginx/error.log;
        access_log  /var/log/nginx/access.log;

        server_name oop.local www.oop.local;

        location / {
                index index.php;
                try_files $uri $uri/ /index.php?$args;
        }

        location ~ [^/]\.php(/|$) {
                fastcgi_split_path_info ^(.+?\.php)(/.*)$;
                if (!-f $document_root$fastcgi_script_name) {return 404;}
                fastcgi_param HTTP_PROXY "";
                include fastcgi_params;
                fastcgi_pass unix:/var/run/php/php8.0-fpm.sock;
                fastcgi_index index.php;
                fastcgi_param SCRIPT_FILENAME $request_filename;
        }

        location ~ /\.ht {
                deny all;
        }
}


The configuration is the same as at work.

Performed composer install
And copied .env.example to .env, although I did not get to work with the database.

The log file /var/log/nginx/error.log is empty.

Error 500 in the browser

Permissions for folders
tmY1rLh.png

Where else can I see errors?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey Burduzha, 2021-11-12
@serii81

Problem solved.
The key was not generated.

sudo chown -R www-data:www-data storage
cp .env.example .env
php artisan key:generate
php artisan cache:clear 
php artisan config:clear

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question