corsasport.co.uk
 

Corsa Sport » Message Board » Off Day » Geek Day » Apache Problem


New Topic

New Poll
  Subscribe | Add to Favourites

You are not logged in and may not post or reply to messages. Please log in or create a new account or mail us about fixing an existing one - register@corsasport.co.uk

There are also many more features available when you are logged in such as private messages, buddy list, location services, post search and more.


Author Apache Problem
Laney
Member

Registered: 6th May 03
Location: Leeds
User status: Offline
6th Dec 11 at 09:54   View User's Profile U2U Member Reply With Quote

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
6th Dec 11 at 10:20   View User's Profile U2U Member Reply With Quote

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


Avatar

Registered: 10th Nov 02
Location: Roydon, Essex
User status: Offline
6th Dec 11 at 10:24   View Garage View User's Profile U2U Member Reply With Quote

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
6th Dec 11 at 10:29   View User's Profile U2U Member Reply With Quote

Wildcard subdomains...
Laney
Member

Registered: 6th May 03
Location: Leeds
User status: Offline
6th Dec 11 at 11:53   View User's Profile U2U Member Reply With Quote

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
6th Dec 11 at 11:58   View User's Profile U2U Member Reply With Quote

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
6th Dec 11 at 12:04   View User's Profile U2U Member Reply With Quote

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
6th Dec 11 at 12:13   View User's Profile U2U Member Reply With Quote

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
6th Dec 11 at 12:28   View User's Profile U2U Member Reply With Quote

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
6th Dec 11 at 12:39   View User's Profile U2U Member Reply With Quote

Have been meaning to try ISPConfig; guessing you no likey?
Laney
Member

Registered: 6th May 03
Location: Leeds
User status: Offline
6th Dec 11 at 13:02   View User's Profile U2U Member Reply With Quote

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!

 
New Topic

New Poll

  Related Threads Author Forum Replies Views Last Post
XMB Message Board Sam General Chat 6 317
20th Jul 03 at 13:50
by Sam
 
Installing Php on a windows server with Apache Aaron Geek Day 6 260
25th Oct 06 at 04:22
by Ian
 
Installing GD library Jodi_the_g Geek Day 6 2424
31st Oct 06 at 03:06
by PaulW
 
pic request-ginger coloured corsas UPDATE MY CORSA IN THSI COLOUR OPINIONS WANTED:) corsabsonny General Chat 24 2541
8th Apr 10 at 14:19
by am4nf
 
Cheap SSL certificates Sam Geek Day 20 619
5th May 11 at 22:13
by Dom
 

Corsa Sport » Message Board » Off Day » Geek Day » Apache Problem 29 database queries in 0.0086951 seconds