• Introducing WebPros Cloud - a fully managed infrastructure platform purpose-built to simplify the deployment of WebPros products !  WebPros Cloud enables you to easily deliver WebPros solutions — without the complexity of managing the infrastructure.
    Join the pilot program today!
  • Support for BIND DNS has been removed from Plesk for Windows due to security and maintenance risks.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS.

Automatic Subdomain Creation

F

fuser

Guest
Hello,

I am trying to develop a script that automatically signs up users and creates subdomains for them programmatically.

From my reading I have concluded that there are 2 ways to do this. Actually creating the subdomain in the httpd.conf file or using the rewrite.

It also looks like you have to restart apache everytime you create a subdomain in the httpd.conf - which of course is not very convenient.

Can anybody advice on which method is better?

Thank you
 
Originally posted by fuser
Can anybody advice on which method is better?

If you make changes to httpd.conf you'll need to restart apache no matter what. Apache dosen't dynamically load changes.

But I can't see why that should be a problem? A gracefull reload of Apache or just restart apache every 15 minutes or so - or may every hour - will not get you into problems.

Else you need to work with rewrite rules - making a ServerAlias in a domain like *.domainname.tld and then make rewrite rules i the httpdocs of the domain.
 
Hey thanks for the reply. I'm sorry this question might sound dumb, but if you do graceful restarts or just restarts every 15 minutes or something, won't the webpage on that server be offline? I mean wont users be able to access the websites shown by apache?
 
Interesting - read it - benificial thanks

But the question still holds. Assume a heavily trafficed site where you will always have children and they will not get idle for some time. Also assume you want to restart directly after creating the subdomain - and you have 2 or 3 subdomains created back to back.

I don't know still not comfortable with the restart. I am right to not be?

Any downfalls to using the rewrite?
 
Back
Top