How to deploy laravel to the host space is nginx both locally and online. configure the rewrite rules first (that is, translate the rules in. htaccess to nginx. conf as they are)
On the server, I directly export SQL. after all, I am not used to using the php command to create a database. of course, this is wise, and laravel's migration function is very powerful, it is really easy to synchronize local and online databases. if you use its migration function, you just need to write a php script and upload it to the server for execution, you do not need to log on to the mysql client on the server.
Vender is installed on the server by using composer. as a result, vender is too large to directly upload files or ftp is too slow. Second, if composer is used, you can obtain the latest stable version of laravel itself and the components in the vendor.
I have not used artisan on the server yet. I only used composer to install the entire framework. php composer installed laravel/laravel and then overwritten the local app and public Upload, you can run it (remember to configure the root directory to point to the public directory, or you have to configure the path yourself)
1. remember that chmod-R 777 app/storage cannot run without the write permission for this directory.
2. remember the online app/config/app. in php, use a 32-bit random KEY and change debug to false. Otherwise, any errors will be displayed directly, which is too insecure.
= From the open source community