How to deploy Vue and Laravel Apps to Droplet

Posted January 27, 2021 2.4k views

I have a Laravel App and separate Vue app that I want to deploy to a Droplet. I have not combined Vue into the Laravel app. I know how to setup Laravel on the server and get that running but how can I setup Nginx Blocks and the Vue app so that when a someone visits the domain name they are taken to the Vue app?

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
1 answer

Hi there,

What you could do is first set up your server and deploy your Laravel application as per this tutorial here:

If you have a domain name you could use something like as the server_name.

Once your Laravel application has been deployed, you can create a new directory at /var/www/ and upload your VueJS project there. After that, you can create a new Nginx server block for your main domain and use as the servername and change the document root to /var/www/

That way when you visit you will reach your Laravel installation and when you visit you will be seeing your VueJS application thanks to the separate Nginx server blocks.


by Erika Heidi
Laravel is an open-source PHP framework that provides a set of tools and resources to build modern PHP applications. With a complete ecosystem leveraging its built-in features, Laravel's popularity has grown rapidly in the past few years, with many developers adopting it as their framework of choice for a streamlined development process. In this guide, you'll install and configure a new Laravel application with Nginx and MySQL 8 on an Ubuntu 20.04 server.