V
V
Victor Smolsky2013-12-25 16:59:44
ISPmanager
Victor Smolsky, 2013-12-25 16:59:44

How to implement the creation of subdomains with script preinstallation?

Please tell me how to implement the following scheme.
A person on the site fills out a form in which the desired login is entered and the create button is pressed.
A user folder is created on the server (integration with the BILLmanager API from ISP, for example) into which the script is preinstalled (it is possible to link BILLmanager ISPmanager through tariffs) and the LOGIN.mydomain.ru domain is assigned. The client visits the created site.
As you probably understood, this is the implementation of the program proposal as a service, without access to the program code. Writing your own billing panel is expensive. What other implementations do you think are possible?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
Nikolai Vasilchuk, 2013-12-25
@Anonym

Nginx:

server_name ~^(?<subdomain>[\w\-]+)\.mydomain\.com$
root /home/$subdomain/www;
...

When registering:
mkdir /home/$username/www
cp /path/do/default/site.php /home/$username/www/index.php

This is very simple

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question