Report this

What is the reason for this report?

Am I doing Wrong? Multiple web applications on a single droplet with LAMP.

Posted on December 5, 2020
THAS

By THAS

Full Stack Web Developer

Hi All,

I have PHP web application (IE: ToDo List - (may be SaaS)), zipped and stored in out of /www folder with an sql file

If a client subscribe using mysite.com/pricing page system will create a directory for the client as /www/clients.mysite.com/client-biz-name-ID/ and unzip the master application and then create database as **client_ID **and import the above sql file in to that.

Meantime it will update the connect.php file with new database name. User and password will be same every time (pre-built one).

After that it will email the client the url to access the application with their login credentials. IE: https://clinets.mysite.com/123-company-pty-9qw8272394

And then there might be some developments according to the client’s request.

That’s it.

(Stop laughing 😋). I studied all these php, php framworks, CMS, server configurations, database management and other few full stack stuffs using the internet only and doing these things for last 10 years.

Am I doing anything wrong? or is there a proper/best way to do these kind of operation?

Waiting for your kind and positive advices…

Cheers!



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

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.

Hi there @THAS,

I personally believe that this is a quite good and solid setup.

Of course, there are other options out there as well, for example:

  • You could Dockerize your application and deploy separate containers for each client application, that way you will have a better separation between the applications.

  • Another option would be to use the new DigitalOcean app platform. That way you will be able to take advantage of features like vertical and horizontal scaling, push-to-deploy support, introspection and etc.

Regards, Bobby

Hello @bobbyiliev,

**Thank you very much for your valuable response. That encourages me a lot! ** Another thing I have to know is, if I give a unique subdomain and a unique port for each client,

IE: client1.mysite.com:9001 and client2.mysite.com:9002

Will this helpful to reduce server faults like bottleneck issues/performance issues when there is a heavy traffic.

Regards, @THAS

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.