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

sdy's avatar
Level 3

Hosting : is it possible to run?

Hi, I'm trying to develop an app using Laravel 5.2.

I wonder if we can run website from different shared hosting? i.e. I want to upload my public folder to lara1.com and other app folders to lara2.com

Is it possible to do that? Or any idea?

0 likes
9 replies
sdy's avatar
Level 3

Thank you.

So if you develop a special app and uploas it to your customers shared hosting how do you keep it safe?

mehany's avatar

@SadayNet Sounds like you are just uploading a Laravel app on a shared hosting, if so then yes you can. In the case you want to just run a Laravel app on a shared hosting, you will need to ensure that their systems support the basic Laravel requirements + your app & your apps' packages requirement ( if any - more likely no special requirements for your app so just the Laravel ones ). Laravel's public folder content becomes the hosing provider public folder content then modify a couple of files to point to the new public folder location. Search Laracasts. shared hosting and you will find several threads about this.

sdy's avatar
Level 3

@mehany, yes I can do that. Laravel working on shared hosting when all files uploaded. But I don't want to upload my app files and folders to the same domain with public folder.

mehany's avatar
But I don't want to upload my app files and folders to the same domain with public folder.

sorry if I misinterpret your question, does this thread address your concern?

sdy's avatar
Level 3

@mehany thank you for you reply. Just I'm not concern about uploading to shared hosting. Just we can think that as a licensing. I need to develop an app and license it to a domain name. So my app will not work on an another domain. I've done some search on the web and found that we can do that with remote functions. So if domain able to access function file, website will work.

willvincent's avatar

If I understand the question correctly, @Snapey answered you a week ago. No you cannot have the laravel source code on one server, and just the 'public' directory on a different server. That is not really possible... unless you mount the remote server with NFS but performance would be so awful that shouldn't even be considered an option.

If, instead what you're really talking about is pointing a domain at a server you control, yes certainly that can be done, and is largely just a DNS issue, with perhaps a bit of server config on your end for the virtual host setup.

Maybe if you clarify exactly what it is you're trying to achieve...

sdy's avatar
Level 3

Yes, exactly I'm trying to tell that "have the laravel source code on one server, and just the public directory on a different server". But I learned that with a weekly research : it's not possible. So now I will work on licensing a web app, maybe it can be a good way to protect an app. Thank you for answers :)

jekinney's avatar

What some apps do like ipboard is every once in awhile it requests validation be sent to ipboard a server (activation code) for the site to work. In theory this is great, in practice a php dev can delete these requirements if they can get ahold of the code.

Others require you to use their hosting which limits access if any, to the code. This is probably the best way but a lot more work. Managing domains, automating deployments etc.

Please or to participate in this conversation.