Subdomains for users

Dirk65

New member
Joined
Dec 20, 2021
Messages
2
Hello all,

Trying to add users (students) who have to get subdomains (3th level) to example.com

So when I add a user called 'tom' he gets a subdomain tom.example.com.

for now, it only generates a new User, but makes a folder in the folder tree of the user with the domain set to (www).example.com.

Does anyone have an idea?
 
I setup a similar setup for a university a couple years ago, except it was a 4th level (studentusername.department.university.edu), all done with php & ldap using the api to provision the student account. Was pretty straight forward. If i remember correctly it also needed set check_subdomain_owner=0 in the directadmin.conf file to work properly at the time. You just need to pass all the info correctly for the create user api call (username, password, emailaddress, username.'departemnt.university.edu', ipaddressonserver, assignedpackage).
 
check_subdomain_owner=0
That is correct if you want to create seperate subdomain accounts. So every user can have their own account with own login info and so on.

You don't need to use an api, you can also create those via the DA panel if that's easier. But I presume the api call is for other things needed by students.
 
API for my use case was used for auto creating users (change passwords, etc..) in part of the registration system. Yes it can also be done manually. But if they have many users, and changing all the time, would be good to automate it.
 
Back
Top