Replace multiple VirtualHosts

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I have got a very large httpd.conf file and am looking for ways to clean it up.

The main problem is the large number of vHosts, most of these follow the same pattern and it's only the subdomain which affects the documentRoot in use.

I have managed to reduce it to the following:

<VirtualHost *:80>
UseCanonicalName Off
VirtualDocumentRoot c:/wwwroot/clients/%1/
ServerName *.server
ServerAlias *. server
ErrorLog c:/logs/errors.log
</VirtualHost>

The issue is the DocumentRoot is not set as it previously was when using multiple vHosts, I understand this is because I'm using the VirtualDocumentRoot instead. 

Is there anyway to get round this problem and have DocumentRoot set to the same value as VirtualDocumentRoot ?

The documentation mentions "The other thing to `fake' is the document root (configured with DocumentRoot and available to CGIs via the DOCUMENT_ROOT environment variable)" but it's not very clear on how to do this.

Thank you for reading.

Nick

[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux