Laney
Member
Registered: 6th May 03
Location: Leeds
User status: Offline
|
Hello,
I'm trying to reconfigure an internal server to give each user their own subdomain/area for development, an example being david.ubuntu.development.local
The idea is that each user can then add further subdomains to their subdomain on a per-project basis, an example being super-awesome-project.david.ubuntu.development.local
I'm happy for the initial set up to be complicated (ie, when a new user is added having to do a bit of magic to make it work) but I can already foresee moaning if creating a sub-subdomain for a user is complicated
Is what I'm doing a) a good idea/approach and b) possible in a user-friendly-ish manner?
Thanks Geek Day
|
ed
Member
Registered: 10th Sep 03
User status: Offline
|
You may have a specific reason to be using sub-domains for this, but wouldn't it be more appropriate to use a directory for each project on the user's sub-domain?
I think there are two ways of doing it though, you can either setup a way to modify your vhosts.conf or and httpd.conf file whenever you want to add a sub-domain, or you can use a wildcard for your sub-domain routing and then write something sever side to decipher the request and send them to the correct place.
There are probably some more experienced people on here who may have a better solution though.
|
willay
Moderator Organiser: South East, National Events Premium Member
Registered: 10th Nov 02
Location: Roydon, Essex
User status: Offline
|
I'd be inclined to go for directories for each project off a users subdomain i.e.
http://david.ubuntu.development.local/OMGSUPERDUPERPROJECTLOLLL/
If you went with your plan you'd have to fuck around with DNS aswell I imagine.
[Edited on 06-12-2011 by willay]
|
Sam
Moderator Premium Member
Registered: 24th Dec 99
Location: West Midlands
User status: Offline
|
Wildcard subdomains...
|
Laney
Member
Registered: 6th May 03
Location: Leeds
User status: Offline
|
The reason I went with sub-subdomains rather than directories is that it replicates the site being in the document root. It's not such a big deal with Wordpress but frameworks like Symfony generally get a bit messy when they're in a sub-directory.
I'm thinking I might need to write a script that does all the hard work and creates vhost files for them all.
Wouldn't a wildcard subdomain per user work?
If this is a shit way of doing it don't be afraid to say it, I'm not going to pretend to be an expert
|
Dom
Member
Registered: 13th Sep 03
User status: Offline
|
I could be way off the mark but create a static and wildcard vhost for each user, with a redirect on the wildcard -
code:
<VirtualHost 127.0.0.1>
DocumentRoot /home/users/willay
ServerAlias willay.ubuntu.development.local
ServerName ubuntu.development.local
</VirtualHost>
<VirtualHost 127.0.0.1>
DocumentRoot /home/users/willay
ServerAlias *.willay.ubuntu.development.local
ServerName willay.ubuntu.development.local
RedirectMatch 301 (.*) http://willay.ubuntu.development.local$1
</VirtualHost>
Then just create a wildcard DNS entry for your domain and IP.
I could be talking absolute bollocks though as I'm lacking some serious sleep but that should work.
Although i'd have a look at one of the free LAMP control panels (HERE) and then setup individual accounts for each user. Might save some of the headaches.
[Edited on 06-12-2011 by Dom]
|
Laney
Member
Registered: 6th May 03
Location: Leeds
User status: Offline
|
Think I'm gonna need to spend some time dicking around with this
We've got a control panel installed but I couldn't get my head around separating all the content for each user. It might be worth persisting though!
|
Dom
Member
Registered: 13th Sep 03
User status: Offline
|
quote: Originally posted by Laney
Think I'm gonna need to spend some time dicking around with this
We've got a control panel installed but I couldn't get my head around separating all the content for each user. It might be worth persisting though!
I've always found it easier to create a few VM's when testing control panels/configs, ie: one clean image of your *nix and then various versions/copies with different control panels etc.
It's a lot easier to nuke an image and start again from the clean image than doing it on the physical system. Once you have something working re-create the install on the physical box.
Webmin and GNUPanel would be the two i'd look at first; although webmin is more a system control panel rather than LAMP.
|
Laney
Member
Registered: 6th May 03
Location: Leeds
User status: Offline
|
I'm thinking anything will be better than ISPConfig we've currently got installed
Thanks for the help
|
Dom
Member
Registered: 13th Sep 03
User status: Offline
|
Have been meaning to try ISPConfig; guessing you no likey?
|
Laney
Member
Registered: 6th May 03
Location: Leeds
User status: Offline
|
We've got the old version so the newer one might be better. It's not that it's bad, but it's not amazing either!
|