Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Due to my job on my localhost I have a lot (think 50+) sites running, these are for about 8 different clients,

I want to organise my sites into subfolders.

I tried putting my sites in subfolders e.g.

/etc/apache2/sites-available/client1/first-site
/etc/apache2/sites-available/client1/second-site
/etc/apache2/sites-available/client1/third-site
/etc/apache2/sites-available/client2/first-site2
/etc/apache2/sites-available/client2/second-site2

But using any combination of:

a2ensite client1/first-site
a2ensite first-site

says the site does not exist.

If I use:

a2ensite client1

then I can enable/disable the entire directory, but that's not really what I want..

Is this feasible? or will I have to manually create the symlinks? if so is there a function I can use as a replacement for a2ensite that will handle subfolders?

share|improve this question

1 Answer 1

up vote 4 down vote accepted

No, you can't. Consider an organization like this:

/etc/apache2/sites-available/00-client0-first-site
/etc/apache2/sites-available/00-client0-second-site
/etc/apache2/sites-available/00-client0-third-site
/etc/apache2/sites-available/01-client1-first-site
/etc/apache2/sites-available/01-client1-second-site

So you can enable them without creating symlinks manually.

An useful link about multiple Virtual Host

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.