Laravel 5.5, 5.6 deployment is unsuccessful, web pages cannot be opened, 500 errors, etc.

First of all, laravel deployment is generally not successful in one-time deployment, and there will be a debugging process. Please be patient to debug if you encounter problems during the deployment process.

1. Domain name resolution, ping the domain name after the resolution is completed, indicating that the resolution is successful

2. Add vhost virtual host to the server, you can add it manually or use an integrated tool, depending on the specific situation. The virtual host pays attention to setting the root directory of the website to the public folder of the site, and adding the url rewriting rules of index.php, as follows:

location / {
       try_files $uri $uri/ /index.php?$query_string;
 }
3. Upload site files

4. It may be necessary to add a soft link, ln -s original folder target folder, or use the php artisan storage:link command, depending on the specific situation

5. Change folder permissions /storage and /bootstrap/cache, chmod -R 777 folder

6. Whether the database is set correctly /congfig/database.php, if there is a .env file in the site directory, please modify the file inside

7. It should be gone. If you can't see the error, please open the laravel debugging mode. If there is no error message, please set the display_errors in php.ini to On, and restart the server.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325090947&siteId=291194637