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

kilenc's avatar

Deploying an Inertia applicaton

I'm building an Inertia application (laravel/vue3) and it works just fine locally on my dev pc. But when I try to deploy it to CPanel it does not work. Specifically it references https://domain/js/app.js in the html file instead of https://domain/public/js/app.js. Can someone help me if it is a Laravel, CPanel(.htacces) or Mix issue?

0 likes
5 replies
vincent15000's avatar

According to what you are saying, it seems to be a misconfiguration in the CPanel.

In the CPanel, you have to declare the public folder of your app : https://domain/public/.

1 like
jlrdw's avatar

Are you correctly pointing to public as the document root.

2 likes
kilenc's avatar

I have all the default settings, I dont know, where I can set that.

1 like
kilenc's avatar

I created a symlink as public_html to public folder, now it says 403 forbidden

Snapey's avatar

in your domains section of cpanel you can say what folder is being served by the domain. It needs to point to your public folder

Please or to participate in this conversation.