Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

MrNobody's avatar

Need help deploying Laravel 10 + Angular 16 app into Apache CPanel domain

I'm kinda of a newbie when it comes to both Laravel and Angular, but i now have a simple app that i want to host on my apache domain. I've researched a bit online but did not find much about it (the fact that i'm using a weird stack doesn't help much in this regard).

my project file structure goes as follows:

-LaravelAngularApp
--backend(laravel)
---app
---config
---database
---public
---.env
--- etc.
--frontend(angular)
---src
---angular.json
---package.json
---tsconfig.json
---etc.

i now require some help on how i should deploy both my laravel and angular into my domain. i already ran ng build and my dist folder was created successfully. do i need to run something on laravel?

Thanks in advance. Any help would be greatly appreciatted.

0 likes
3 replies
martinbean's avatar

@mrnobody You would have been better off building your Angular front-end within the same codebase, instead of creating “backend” and “frontend” apps.

Laravel uses Vite for processing JavaScript, and I’m sure it would have happily handled JavaScript using Angular.

MrNobody's avatar

@martinbean does that mean that my current build is not correct? is there a way to easily rebuild my angular app using Vite? could you link me some guide for this? because when i started my project there weren't many guides for Laravel + Angular stack online and i went with this setup because of a guide i found online.

gych's avatar

You can use a separate Laravel backend application that serves as an API for your frontend SPA that uses Angular but with Laravel you can also implement Angular directly in your Laravel application and connect it to your back end by using Inertia. This simplifies things and speeds up the development process.

Which hosting environment do you use?

Please or to participate in this conversation.