简体   繁体   中英

How to deploy laravel application on my cloud server?

have server digitalocean cloud Ubuntu 16.04.2 x64 Apache 2.4 PHP 7.0.3 and SSL certificate Symantec, I was a Development application web site and am use Laravel 5 v 2.0 in localion host what is a step for upload file in server cloud? What is uplaod file in location to the server? How to deploy laravel application on my cloud server?

Install Composer in your DO server. with the following command.

cd ~
curl -sS https://getcomposer.org/installer | php

We want to install it in a globally accessible location though. Also, we want to change the name to composer. We can do this in one step by typing:

sudo mv composer.phar /usr/local/bin/composer

Then install laravel in /var/www directory

sudo composer create-project laravel/laravel /var/www/laravel

Then give permissions to the directories. Then you can access the site by visiting http://server_domain_or_IP

Then to move the files you worked to the server. You need to create FTP. Check this link

  1. Apache Server Document Root

     DocumentRoot "/var/www/your-project-folder-name/public" 
  2. Restart Apache Server

     For Centos #systemctl restart httpd For Ubuntu #service apache2 restart 

    That's it.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM