I've recently set up a home web/media server and having a few difficulties with a few of the settings. It's working fine for serving webpages etc but I've now reorganised the structure of the main document root and it's now playing hard to get.
Current structure is:
-drive --sites ---live ----siteA ----siteB ----siteC ---dev --media ---films ---series
What I'm trying to do is serve siteC when siteA/siteC is called.
For example mydomain.com will present the files that are in siteA, this is fine. SiteB and SiteC do not have their own domains etc and I don't want them to be subfolders of SiteA so what I'd like is for mydomain.com/siteB to serve up the content that is in siteB and the same with siteC.
I'd then like to use the same premise for the media server so myDomain.com/media will display a directory listing of the files within the media directory.
the document root within apache is d:/sites/live, I'm then using virtual hosts to determine what happens. This is fine with the standard mydomanA.com or myDomainB.com but not when trying to achieve what I mentioned above.
This is one of the attempts:
<VirtualHost *:80> DocumentRoot "D:/Sites/Live/siteA" ServerName www.mydomain.com/siteA <Directory "D:/Sites/Live/siteA"> Order allow,deny Allow from all AllowOverride All </Directory>
Another failed attempt using aliases instead:
<VirtualHost *:80> DocumentRoot "D:/Sites/Live/siteA" ServerName www.mydomain/siteA <Directory "D:/Sites/Live/siteA"> Order allow,deny Allow from all AllowOverride All </Directory> Alias /siteA D:/sites/live/siteA <directory "D:/sites/live/siteA"> Order allow,deny AllowOverride All </directory> </VirtualHost>
Thanks for any help, I've been pulling my hair put for the past few hours trying to find a solution.
Edited to answer comment.
The expected input and output would be along the following:
mydomain.com = d:/sites/live/siteA mydomain.com/siteB = d:/sites/live/siteB mydomain.com/siteC = d:/sites/live/siteC
and the media server would be:
mydomain.com/media = d:/media