jadjoubran / laravel5-angular-material-starter

Get started with Laravel 5.3 and AngularJS (material)
https://laravel-angular.readme.io/
MIT License
1.66k stars 400 forks source link

Set laravel5-angular-material-starter with nginx VPS #327

Closed ghost closed 8 years ago

ghost commented 8 years ago

Hi @jadjoubran

I try to install my project on mon VPS (Debian 8) with a nginx configuration.

Here my server block :

server {
    listen 80;

    root /usr/share/nginx/html/axample.com/public;
    index index.php index.html index.htm;

    server_name example.com;

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

    location ~ \.php$ {
        try_files $uri /index.php =404;
        fastcgi_split_path_info ^(.+\.php)(/.+)$;
        fastcgi_pass unix:/var/run/php5-fpm.sock;
        fastcgi_index index.php;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        include fastcgi_params;
    }
}

On my broswer, when i call the URL "example.com", I have this message :

The example.com page isn’t working

example.com is currently unable to handle this request. HTTP ERROR 500

I don't know why I have a 500 error page

Thanks in advance

flick36 commented 8 years ago

You have a typo, in your root path, it should be example.com not axample.com

althoug i doubt that's the real domain you are using, but can you post your log? it should be in /var/log/nginx/error.log

also have you set permissions to the storage and bootstrap/cache folders? with:

sudo chown -R www-data bootstrap/cache and sudo chown -R www-data storage

ghost commented 8 years ago

I have not set the permissions, works, thanks a lot!

flick36 commented 8 years ago

Cool glad to help

This is solved as well @jadjoubran