sites-available subfolders and a2ensite?
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
Related videos on Youtube
Hailwood
I could tell you all about me... but I'd prefer to let my work do the talking for me!
Updated on September 18, 2022Comments
-
Hailwood over 1 year
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-site2But using any combination of:
a2ensite client1/first-site
a2ensite first-sitesays 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?