(How) Laravel Deploying with FTP

I built a laravel project and I usually use localhost with the "php artisan serve" command to test my project

But now I want to host on the server. I successfully connected my server using FileZilla. and I tested, I can put a simple abc.html file and access using ___. com / abc.html

How to deploy my laravel project on my server? Can I just upload the entire laravel project to the server and then access without any command? or should be removed from SSH and install something?

Thank!

+1
source share
3 answers

. public_html. , public_html, "" Laravel ( , , ).

public_html, - .

0

, - public/? index.php, .

0

:

public_html

mysql ( cPanel)

.sql phpmyadmin -.

public_html .env,

DB_DATABASE=yourdatabasename
DB_USERNAME=database username
DB_PASSWORD=database password

- !

, /phpmyadmin sql ( phpmyadmin)

Drop

, LAMP , (/var/www/html) filezilla

. , , .env

SSH (Putty)

chgrp -R www-data/var/www/html

chmod -R 775/var/www/html/.env

chmod -R 775/var/www/html/storage

chmod -R 775/var/www/html/bootstrap

chmod -R 775/var/www/html/public/uploads

Run the command below to enable the mod_rewrite module

sudo a2enmod rewrite

Now open 000-default.conf

sudo nano /etc/apache2/sites-available/000-default.conf

Add below line below

 AllowOverride all 

Now restart apache2 server

sudo service apache2 restart 

Now it will go to your website and the application will dance there.

0
source

Source: https://habr.com/ru/post/1649356/


All Articles