How to deploy laravel to the host space

Source: Internet
Author: User
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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.