Page 1 of 1

Question: How to Deploy Laravel on Vestacp Ubunto Server

Posted: Tue Feb 20, 2018 9:13 am
by ypildex03
I have finished my laravel application and I wanted to deploy to vps server, I have also successfully setup my vps server with vestacp and it's running and working very well. I've tried to search on google but I could not find any step by step tutorial and my knowledge on server administration is very limited. Hoping for someone could teach me. Thank you in advance.

Re: Question: How to Deploy Laravel on Vestacp Ubunto Server

Posted: Tue Feb 20, 2018 9:57 am
by ScIT
ypildex03 wrote:
Tue Feb 20, 2018 9:13 am
I have finished my laravel application and I wanted to deploy to vps server, I have also successfully setup my vps server with vestacp and it's running and working very well. I've tried to search on google but I could not find any step by step tutorial and my knowledge on server administration is very limited. Hoping for someone could teach me. Thank you in advance.
check the templates in /usr/local/vesta/data/templates/web/apache2, copy the default.tpl and default.stpl to (for example) laravel.tpl and laravel.stpl and modify the docroot (add public). Then you can choose the new template and laravel should run without any troubles.

Re: Question: How to Deploy Laravel on Vestacp Ubunto Server

Posted: Tue Feb 20, 2018 11:28 am
by kanzen
If you are trying to deploy the latest Laravel (5.6) you probably need to upgrade your PHP

Laravel 5.6 Server Requirements:

PHP >= 7.1.3
OpenSSL PHP Extension
PDO PHP Extension
Mbstring PHP Extension
Tokenizer PHP Extension
XML PHP Extension
Ctype PHP Extension
JSON PHP Extension

Re: Question: How to Deploy Laravel on Vestacp Ubunto Server

Posted: Wed Feb 21, 2018 12:37 am
by ypildex03
kanzen wrote:
Tue Feb 20, 2018 11:28 am
If you are trying to deploy the latest Laravel (5.6) you probably need to upgrade your PHP

Laravel 5.6 Server Requirements:

PHP >= 7.1.3
OpenSSL PHP Extension
PDO PHP Extension
Mbstring PHP Extension
Tokenizer PHP Extension
XML PHP Extension
Ctype PHP Extension
JSON PHP Extension

Thank you for your response .. My laravel version is 5.5. And already upgraded the php version to 7.1 since the minimum version is 7.1 for laravel 5.5.

Re: Question: How to Deploy Laravel on Vestacp Ubunto Server

Posted: Wed Feb 21, 2018 12:40 am
by ypildex03
ScIT wrote:
Tue Feb 20, 2018 9:57 am
ypildex03 wrote:
Tue Feb 20, 2018 9:13 am
I have finished my laravel application and I wanted to deploy to vps server, I have also successfully setup my vps server with vestacp and it's running and working very well. I've tried to search on google but I could not find any step by step tutorial and my knowledge on server administration is very limited. Hoping for someone could teach me. Thank you in advance.
check the templates in /usr/local/vesta/data/templates/web/apache2, copy the default.tpl and default.stpl to (for example) laravel.tpl and laravel.stpl and modify the docroot (add public). Then you can choose the new template and laravel should run without any troubles.
Thank you for this guide. May I know where to put or in what directory should I put my whole laravel apps? I'm using github to clone my laravel app.

Re: Question: How to Deploy Laravel on Vestacp Ubunto Server

Posted: Wed Feb 21, 2018 12:57 am
by ypildex03
Also tried this one by peterbrinck https://gist.github.com/peterbrinck/266 ... 70be27edc3
but I was not able to work. I'm little bit confused or I dont get this part of the instruction
Then, when you edit your domain/site, you can change the web template to Laravel and just upload your whole project into public_html
what or w/c web template he/she is referring to?

Re: Question: How to Deploy Laravel on Vestacp Ubunto Server

Posted: Wed Feb 21, 2018 7:21 am
by ScIT
ypildex03 wrote:
Wed Feb 21, 2018 12:57 am
Also tried this one by peterbrinck https://gist.github.com/peterbrinck/266 ... 70be27edc3
but I was not able to work. I'm little bit confused or I dont get this part of the instruction
Then, when you edit your domain/site, you can change the web template to Laravel and just upload your whole project into public_html
what or w/c web template he/she is referring to?
no need to be so gender friendly xD

If you set the files in your template folder like it is described on your link (https://gist.github.com/peterbrinck/266 ... 70be27edc3) ypu will get a new template called laravel. This new template you can set, when you log in with admin, then clicl on login on the right user, go to web, then edit the wanted domain and set the apache2 template to laravel (normaly from default). that's really not so hard...

Re: Question: How to Deploy Laravel on Vestacp Ubunto Server

Posted: Wed Feb 21, 2018 8:46 am
by ypildex03
ScIT wrote:
Wed Feb 21, 2018 7:21 am
ypildex03 wrote:
Wed Feb 21, 2018 12:57 am
Also tried this one by peterbrinck https://gist.github.com/peterbrinck/266 ... 70be27edc3
but I was not able to work. I'm little bit confused or I dont get this part of the instruction
Then, when you edit your domain/site, you can change the web template to Laravel and just upload your whole project into public_html
what or w/c web template he/she is referring to?
no need to be so gender friendly xD

If you set the files in your template folder like it is described on your link (https://gist.github.com/peterbrinck/266 ... 70be27edc3) ypu will get a new template called laravel. This new template you can set, when you log in with admin, then clicl on login on the right user, go to web, then edit the wanted domain and set the apache2 template to laravel (normaly from default). that's really not so hard...

Thank you for this guide. I really appreciated your kindness and effort. thank you so much. I will let you know if this one work.

Re: Question: How to Deploy Laravel on Vestacp Ubunto Server

Posted: Sun Feb 25, 2018 8:56 am
by ypildex03
Just a feedback .still not working now my public>index.php is not showing
Image


I've followed the instruction as what instructed here.

Each file should be put in /usr/local/vesta/data/templates/web/apache2

I put the file in the in their respective location..

Image


And change the web template to laravel and restarted apache2.


Image

Re: Question: How to Deploy Laravel on Vestacp Ubunto Server

Posted: Thu May 23, 2019 11:12 am
by olidev
Which VPS are you using? If it's DigitalOcean, they have a pretty good documentation that could help you in deployment. Otherwise you can check out there marketplace to see if there is any one-click deployment solution there. Have you tried using PHP deployment tools, like Envoyer or DeployBot. These tools can make the deployment process simpler. For example with Envoyer you have to connect your Envoyer account with github and your server through ssh keys and deploy your app from github to the server through this tool. For this to work, you must have created a repo of your Laravel project that is on your localhost.