How to deploy Laravel to host space

Source: Internet
Author: User
Tags composer install laravel migration
Both local and online are nginx, first with good rewrite rules (that is, the htaccess inside the rules are translated into nginx.conf inside)

Server, I am direct SQL, after all, I am not accustomed to use PHP command to create a database, of course, this is a matter of opinion, laravel migration function is very powerful, in the synchronization of local and online database, it is very simple, if you use its migration function, After all, just write a php script, upload to the server and then execute the line, do not have to log on the server to the MySQL client to operate.

Vender is on the server of course to use composer installed, one vendor too big, with direct upload or FTP are too slow, and secondly, with composer words, you can get laravel itself and vendor the latest stable version of the components.

I am not currently on the server with artisan, only with composer for the entire framework of the installation, PHP composer install laravel/laravel, then the local app and public upload overlay, you can run the ( Remember to configure the root directory to point to the public directory, or you have to configure the path yourself)

1. Remember Chmod-r 777 app/storage, do not write permission to this directory, is not able to run

2. Remember that the online version of the app/config/app.php, using a 32-bit random KEY, and then change the debug to False, or any errors will be displayed directly, too insecure

= = Excerpt from 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.