I have a shared cpanel hosting. I have to deploy two laravel apps. one as main domain. second as subdomain created in cpanel. I can create subdomain folder in home directory or inside public_html folder
For a single laravel app, I would put all the content outside public_html folder and public folder content inside public_html and do some changes in index.php to hit public_html instead of public
This post is now very old (blimey, can't believe its 5 years!) but will show one way to have a project in a subdomain. Its not cpanel specific but should give you some ideas.
That's how I upload a single app on a shared hosting. But my shared hosting cpanel doesn't offer separate public_html for subdomain. There's only one directory.
You can actually publish both applications’ public folders inside public_html.
What you’ll have to do then, is to configure each domain / sub domain at cpanel to have the corresponding folder inside public_html as its document root.
By default your main domain should have public_html as document root so you’ll have to change it too to something like home/user/public_html/application_one
I’m sorry I can’t give you a more complete answer but it gets kind of difficult from mobile sometimes hehe
@snapey at least in my case GoDaddy allows me to pick up any folder below my home directory as the Document Root for that subdomain.
So you could choose a folder outside public_html, but I suggested placing both within public_html because it seemed ok based on @faheemakbar18 description.
I just confirmed that even suggest me the document root /home/user/public_html/subdomain after finishing typing the new subdomain name, although I usually change that to use a different folder destined for all my subdomains.