Jump to content

Setting up an account on Web app


Go to solution Solved by gizmola,

Recommended Posts

Hello guys.

I really don't know what to use as a topic and my question might no be clear enough cos I might lack adequate words to put it together but I will try by using examples anyhow.

My question is

Like during joomla or WordPress installation, the processes one has to undergo e.g filling the company/application name, database name, admin username and password, color scheme etc. 

In like manner, one has a web app hosted. How to enable different user create their own account and setup their database etc

For example I have a web app hosted at https://myapp.com

A user can setup their shop on my app https://myapp.com/shop1 or shop1.myapp.com

Hope I tried to make it clear enough

Thanks

Link to comment
https://forums.phpfreaks.com/topic/317325-setting-up-an-account-on-web-app/
Share on other sites

  • Solution

In general, this would be called provisioning. 

For the most part, this requires that your application have an underlying architecture that supports this.

In terms of DNS, you can set up a wildcard DNS entry for *.myapp.com.

Internally, your application needs code that accepts a request, examines the requested url, extracts the subdomain, and executes the routing accordingly, or you can also have a rewrite that will look for subdomains other than 'www' and rewrite those to https://myapp.com/shop1.

When a new user creates a store, you will run provisioning code in your application that does any required setup (make new database user, create database with new user assigned rights, save credentials in user profile configuration file or in database.)  There are strengths and weaknesses to each approach so you have to consider the tradeoffs and security implications of each approach.  For example, you could just use the primary database access user, and not create a separate database user for each customer database.  There isn't one right answer for each application.  

I'll go ahead and say that typically

16 hours ago, I-AM-OBODO said:

In like manner, one has a web app hosted. How to enable different user create their own account and setup their database etc

one does not do that. Because the users on your site are not actually setting up a web app.

When you signed up on PHPFreaks, you got an account. There's a "page" for you at https://forums.phpfreaks.com/profile/63588-i-am-obodo/ and you can create content in your personal space (so to speak).
None of that came with actual system accounts. You don't have a database dedicated to you, let alone a database account.

Because your ability to do those things is part of our application. You are not, in fact, setting up your own application. You're simply using ours.

If you literally want people to set up applications and write code that lets them connect to databases, that's one thing. But that's not what it sounds like you're describing.

What you're describing is basically like what happens on many other ecommerce sites: you sign up, you get a "store" you may or may not be able to customize (be that a URL or subdomain), and you start selling items. As a user, you don't want to spend your time dealing with databases, or installing WordPress, or updating extensions, or writing HTML, or really doing anything else except for putting items up for sale and fulfilling orders.

12 hours ago, requinix said:

I'll go ahead and say that typically

one does not do that. Because the users on your site are not actually setting up a web app.

When you signed up on PHPFreaks, you got an account. There's a "page" for you at https://forums.phpfreaks.com/profile/63588-i-am-obodo/ and you can create content in your personal space (so to speak).
None of that came with actual system accounts. You don't have a database dedicated to you, let alone a database account.

Because your ability to do those things is part of our application. You are not, in fact, setting up your own application. You're simply using ours.

If you literally want people to set up applications and write code that lets them connect to databases, that's one thing. But that's not what it sounds like you're describing.

What you're describing is basically like what happens on many other ecommerce sites: you sign up, you get a "store" you may or may not be able to customize (be that a URL or subdomain), and you start selling items. As a user, you don't want to spend your time dealing with databases, or installing WordPress, or updating extensions, or writing HTML, or really doing anything else except for putting items up for sale and fulfilling orders.

Thanks for your reply. But you don't get what I am trying to convey cos I might have not conveyed it proper. But your explanation is way different from what I am asking of! I know all about my account with with phpfreak ans all that cos I have built app and websites with such privileges and user areas but this is totally different from my question. Gizmola has a better understanding for my question. Provisioning is word for it. I have perused through an web app that does what I want and I know it's quite different from what I'm used to. I can manually set up each account I know. I also know that I can create a subdomain for for each store and create different database for each of them. I know all these. But it's totally different from the question I asked. 

On this Web app that I want to copy, I visited, filled my choice name and filled some forms based on my own likings and what the form requires. After filling the form and submit, a subdomain was created automatically for me with all the basic database settings so that when I am logged in, I can complete the setting and my profile as per my requirements.

Hope you get a better picture and know that it's way different from what you said or the analogy between me creating an account on phpfreaks and all that.

Thanks for the response though. I appreciate it

16 hours ago, gizmola said:

In general, this would be called provisioning. 

For the most part, this requires that your application have an underlying architecture that supports this.

In terms of DNS, you can set up a wildcard DNS entry for *.myapp.com.

Internally, your application needs code that accepts a request, examines the requested url, extracts the subdomain, and executes the routing accordingly, or you can also have a rewrite that will look for subdomains other than 'www' and rewrite those to https://myapp.com/shop1.

When a new user creates a store, you will run provisioning code in your application that does any required setup (make new database user, create database with new user assigned rights, save credentials in user profile configuration file or in database.)  There are strengths and weaknesses to each approach so you have to consider the tradeoffs and security implications of each approach.  For example, you could just use the primary database access user, and not create a separate database user for each customer database.  There isn't one right answer for each application.  

Thanks for the response. You've shed more light on the topic for me. I will do more research on provisioning. At least I know the name of what I will be researching about! 

Though I know all about creating a subdomain for them and setting up the database base etc. But I want it automated without me doing a thing. They should just fill form and voilà! It created.

Thanks for the tips!

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.