• Halloween is coming! To celebrate the occasion, we dusted off a couple of old skins, and even created a brand new one (Pixel).
    To get into the festive spirit, install the Skins extension.
  • The new Python extension is now available. It allows customers to deploy and manage WSGI-based Python applications on their websites directly from Plesk.
  • The Plesk Mobile apps for iOS and Android and the Plesk Mobile Center extension have been deprecated, and are no longer available for new installations. In Plesk Obsidian 18.0.84, the Plesk Mobile Center extension will be removed from servers during the upgrade, and the Plesk Mobile apps will lose their server management features.
  • The Social Login extension has been deprecated and will be removed in Plesk Obsidian 18.0.84. After that, it will no longer be possible to log in to Plesk with a Google, Facebook, GitHub account, or with a passkey. Plesk usernames and passwords, as well as logging in with a WebPros Account, are not affected.

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