0

I was trying to setup my development workstation on Fedora 26. So I install Nginx, php-fpm and MySQL 5.7. I also change the user who execute php on /etc/php-fpm.d/www.conf

I put my fresh laravel installation on /var/www/html/ and change the owner of the /var/www/html to the one who run php-fpm.

I set up my nginx configuration

server {
    server_name laravel5.dev;
    access_log /var/log/nginx/laravel5.access.log;
    error_log /var/log/nginx/laravel5.error.log;
    root /var/www/html/laravel5/public;

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

    location ~ \.php$ {
        try_files $uri /index.php =404;
        fastcgi_split_path_info ^(.+\.php)(/.+)$;
        include /etc/nginx/fastcgi_params;
        fastcgi_pass 127.0.0.1:9000;
        fastcgi_index index.php;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        include fastcgi_params;
    }
}

So. The homepage is running correctly. And I install the basic authentication from laravel. And when I got go into the /login page. I got some error that the laravel.log is permission denied. I am pretty sure that I set its permission to 777 and the owner of the directory is the owner of the php-fpm.

Is there something that I missed? Thanks in advance.

Dinal Koyani
  • 455
  • 3
  • 6
KevDev
  • 541
  • 2
  • 6
  • 20
  • `I am pretty sure` is not enough :-) Check - did you, or didn't you? [The installation docs](https://laravel.com/docs/5.5) describe exactly what steps to do permissions-wise. – Don't Panic Nov 11 '17 at 10:38
  • yes I already set `bootstrap/cache` and `storage` to 777 – KevDev Nov 11 '17 at 10:42
  • 1
    Setting permissions on `storage` is not what the docs say you need to do. They say: `Directories within the storage and the bootstrap/cache directories should be writable by your web server`. Directories *within*, which means eg `storage/logs/`. – Don't Panic Nov 11 '17 at 10:46

0 Answers0