Hi there,
Something really got messed up with creating sub-servers in my VM Pro installation!
I haven’t changed the server templates or anything else and the sub-server/sub-domain use the (modified) default server templates anyway, so I don’t know why this behaves differently now than a couple of weeks ago.
I just created a new server magento-webshop.ch and afterwards created the sub-domain demo.magento-webshop.ch which resulted in this file tree:
tree -L 3
.
|-- awstats
|-- base
|-- cgi-bin
| |-- awstats.pl
| |-- demo
| | |-- php4.cgi
| | -- php5.cgi | |-- lang -> /usr/share/awstats/lang/lang | |-- lib -> /usr/share/awstats/lib/lib | |-- php4.cgi | |-- php5.cgi |
– plugins -> /usr/share/awstats/plugins/plugins
|-- domains
| -- demo.magento-webshop.ch | |-- base | |-- cgi-bin | |-- domains | |-- errors | |-- etc | |-- ftp | |-- homes | |-- htdocs | |-- logs | |-- perl | |-- ssl |
– tmp
|-- etc
| |-- dav.digest.passwd
| |-- php.ini -> php4/php.ini
| |-- php4
| | -- php.ini |
– php5
| -- php.ini |-- ftp |-- homes |-- htdocs | |-- awstats-icon -> /usr/share/awstats/icon | |-- demo | |-- errors -> ../errors |
– icon -> /usr/share/awstats/icon
|-- logs
| |-- access_log
| -- error_log |-- mail |-- perl |-- ssl
– tmp
The first part of the sub domain’s apache config looks like this:
ServerName demo.magento-webshop.ch
ServerAlias www.demo.magento-webshop.ch
DocumentRoot /var/www/virtual/magento-webshop.ch/htdocs/demo
ErrorLog /var/www/virtual/magento-webshop.ch/logs/error_log
CustomLog /var/www/virtual/magento-webshop.ch/logs/access_log combined
ScriptAlias /cgi-bin/ /var/www/virtual/magento-webshop.ch/cgi-bin/demo/
DirectoryIndex index.html index.htm index.php index.php4 index.php5
whereas the DocumentRoot should actually be /var/www/virtual/magento-webshop.ch/domains/demo.magento-webshop.ch/htdocs/
Strangely enough, VM creates two different directories
/var/www/virtual/magento-webshop.ch/domains/demo.magento-webshop.ch/htdocs/
and
/var/www/virtual/magento-webshop.ch/htdocs/demo
The latter path then goes into the Apache configuration, although nothing like that is specified in the template:
ServerName ${DOM}
ServerAlias www.${DOM}
DocumentRoot ${HOME}/htdocs
ErrorLog ${HOME}/logs/error_log
CustomLog ${HOME}/logs/access_log combined
ScriptAlias /cgi-bin/ ${HOME}/cgi-bin/
DirectoryIndex index.html index.htm index.php index.php4 index.php5
This has been working without any problems a couple of weeks ago.
Any pointers as to where the problem could be would be very much appreciated.
Cheers, Nick