Nginx + php + laravel has been set up on mac, without too many configurations. Instead, configure the nginx root path to the public directory of laravel, and set listening to port 80, the google font on the laravelwelcome page has been removed, not a google issue. If I use phparti... nginx + php + laravel has been set up on mac, without too many configurations. Instead, configure the nginx root path to the public directory of laravel, and set listening to port 80, the google font on the laravel welcome page has been removed, not a google issue.
If I use php artisan serve to use the laravel built-in server, I can normally access the laravel default welcome page (http: // localhost: 8000) and modify views/welcome. blade. php, refreshing the page is also normal.
Use nginx to access port 80: Access normal php files (http: // localhost/a. php), for example, create a. php file under public, and access and print phpinfo files. But the access (http: // localhost) cannot be accessed, and the page is blank. The link is through the nginx server.
PS: If I access the built-in Port 8000 first, I can access port 80. However, I cannot directly access port 80 after modifying the template file.
Where is the configuration problem or other problems?
Laravel versions: 5.2
Php version: 7.0.2
Resolved
: I have changed the permissions of laravel/storage and laravel/bootstrap/cache.
sudo chmod -R 777 laravel/storage
sudo chmod -R 777 laravel/bootstrap/cache
But I still don't know why this problem won't happen when I use php artisan serve.
Reply content:
Nginx + php + laravel has been set up on mac, without too many configurations. Instead, configure the nginx root path to the public directory of laravel, and set listening to port 80, the google font on the laravel welcome page has been removed, not a google issue.
If I use php artisan serve to use the laravel built-in server, I can normally access the laravel default welcome page (http: // localhost: 8000) and modify views/welcome. blade. php, refreshing the page is also normal.
Use nginx to access port 80: Access normal php files (http: // localhost/a. php), for example, create a. php file under public, and access and print phpinfo files. But the access (http: // localhost) cannot be accessed, and the page is blank. The link is through the nginx server.
PS: If I access the built-in Port 8000 first, I can access port 80. However, I cannot directly access port 80 after modifying the template file.
Where is the configuration problem or other problems?
Laravel versions: 5.2
Php version: 7.0.2
Resolved
: I have changed the permissions of laravel/storage and laravel/bootstrap/cache.
sudo chmod -R 777 laravel/storage
sudo chmod -R 777 laravel/bootstrap/cache
But I still don't know why this problem won't happen when I use php artisan serve.
When you use php artisan serve, php is called by the user, so no permission is insufficient.
During nginx running, the account may not have the write permission for the project file. You need to check which user is configured in the nginx configuration file and change the account to which the storage belongs.
In the local environment, open the php. ini error prompt and run it to see what went wrong. I guess it should be the cause of the low php version in your mac environment. Try php5.6.