|1) If you wish to change just 1 subdomain path, you'd use this guide as a starting point:|
and insert the following code
Change subname to the name of the subdomain you want to set the path for.
Also change the path to the path you'd like.
Failing to use the if statement on the subdomain will cause the main domain and all subdomains to use this new path, which isn't always as desired.
2) Going into more detail, the DocumentRoot for a subdomain will always have the "sub" name appended to the end. If this is not the desired effect, then the templates would have to be modified to get rid of the bit on the end, while still allowing subdomain paths for normal subdomains to be valid. To do that, first copy the templates to the custom folder
|?DOCROOT=`HOME`/domains/`DOMAIN`/public_html|and change it to be:
|?DOCROOT=`HOME`/domains/`DOMAIN`/public_html/`SUB`|Same thing for this line:
|?CGI=ScriptAlias /cgi-bin/ `DOCROOT`/`SUB`/cgi-bin/|change it to be:
|?CGI=ScriptAlias /cgi-bin/ `DOCROOT`/cgi-bin/|and one last time for a 3rd line, change:
DocumentRoot |DOCROOT|/|SUB|to be:
Save the 2 virtual_host2*_sub.conf with these 3 changes, then proceed with step 1 normally, and the path will be what you're looking for. All existing subdomains will also remain unaffected, since we just moved the SUB part from the bottom, and moved it to the top.
3)Similarly, if you only which to change the path of the domain and not any subdomains, you can use
|Adding custom httpd.conf code to the VirtualHosts of a domain|
© 2003 JBMC Software, Suite 173 3-11 Bellerose Drive, St Albert, AB T8N 1P7 Canada. Mon-Fri 9AM-5PM MST