Hello,
My IP got changes recently and my host updated DirectAdmin on my VPS resulting in the loss of my custom templates.
While I was redoing my templates i noticed something strange.
In my httpd.conf customization page i have the following line:
The following is my virtual_host2_sub.conf:
Notice the red text, why does |DOCROOT| have 2 different values in the same file? Custom sub domains aren't working because of this issue.
My IP got changes recently and my host updated DirectAdmin on my VPS resulting in the loss of my custom templates.
While I was redoing my templates i noticed something strange.
In my httpd.conf customization page i have the following line:
Code:
|*if SUB="movies"|
|?DOCROOT=/home/admin/domains/movies.yogglr.me/html|
|*endif|
The following is my virtual_host2_sub.conf:
Code:
|?DOCROOT=`HOME`/domains/`SUB`.`DOMAIN`|
|?OPEN_BASEDIR_PATH=`HOME`/:/tmp:/var/tmp:/usr/local/lib/php/|
<VirtualHost |IP|:80 |MULTI_IP|>
[COLOR="Red"]# |DOCROOT|[/COLOR]
|?CGI=ScriptAlias /cgi-bin/ `DOCROOT`/`SUB`/cgi-bin/|
ServerName |SUB|.|DOMAIN|
ServerAlias www.|SUB|.|DOMAIN| |SUB|.|DOMAIN| |SERVER_ALIASES|
ServerAdmin |ADMIN|
DocumentRoot |DOCROOT|
|CGI|
|USECANONICALNAME|
#SuexecUserGroup |USER| |GROUP|
RMode config
#RDocumentChRoot /home/|USER| |DOCROOT|
RUidGid |USER| |GROUP|
RGroups apache
|CUSTOM|
CustomLog /var/log/httpd/domains/|DOMAIN|.|SUB|.bytes bytes
CustomLog /var/log/httpd/domains/|DOMAIN|.|SUB|.log combined
ErrorLog /var/log/httpd/domains/|DOMAIN|.|SUB|.error.log
<Directory |DOCROOT|>
[COLOR="Red"]# |DOCROOT|[/COLOR]
Options +Includes -Indexes
|*if CLI="1"|
php_admin_flag engine |PHP|
<IfModule !mod_php6.c>
php_admin_flag safe_mode |SAFE_MODE|
</IfModule>
php_admin_value sendmail_path '/usr/sbin/sendmail -t -i -f |USER|@|DOMAIN|'
|*endif|
|*if OPEN_BASEDIR="ON"|
php_admin_value open_basedir |OPEN_BASEDIR_PATH|
|*endif|
|*if SUPHP="1"|
suPHP_Engine |PHP|
suPHP_UserGroup |USER| |GROUP|
|*endif|
</Directory>
<Location /phpMyAdmin>
RMode config
RUidGid webapps webapps
RGroups apache
</Location>
<Location /phpmyadmin>
RMode config
RUidGid webapps webapps
RGroups apache
</Location>
<Location /squirrelmail>
RMode config
RUidGid webapps webapps
RGroups apache
</Location>
<Location /roundcube>
RMode config
RUidGid webapps webapps
RGroups apache
</Location>
<Location /uebimiau>
RMode config
RUidGid webapps webapps
RGroups apache
</Location>
<Location /webmail>
RMode config
RUidGid webapps webapps
RGroups apache
</Location>
<Location /atmail>
RMode config
RUidGid webapps webapps
RGroups apache
</Location>
|HANDLERS|
|MIMETYPES|
</VirtualHost>
Code:
<VirtualHost 83.172.180.157:80 >
[COLOR="Red"]# /home/admin/domains/cms.yogglr.me[/COLOR]
ServerName cms.yogglr.me
ServerAlias www.cms.yogglr.me cms.yogglr.me
ServerAdmin [email protected]
DocumentRoot /home/admin/domains/cms.yogglr.me
UseCanonicalName OFF
#SuexecUserGroup admin admin
RMode config
#RDocumentChRoot /home/admin /home/admin/domains/cms.yogglr.me
RUidGid admin admin
RGroups apache
CustomLog /var/log/httpd/domains/yogglr.me.cms.bytes bytes
CustomLog /var/log/httpd/domains/yogglr.me.cms.log combined
ErrorLog /var/log/httpd/domains/yogglr.me.cms.error.log
<Directory /home/admin/domains/cms.yogglr.me/webroot>
[COLOR="Red"]# /home/admin/domains/cms.yogglr.me/webroot[/COLOR]
Options +Includes -Indexes
php_admin_flag engine ON
<IfModule !mod_php6.c>
php_admin_flag safe_mode OFF
</IfModule>
php_admin_value sendmail_path '/usr/sbin/sendmail -t -i -f [email protected]'
</Directory>
<Location /phpMyAdmin>
RMode config
RUidGid webapps webapps
RGroups apache
</Location>
<Location /phpmyadmin>
RMode config
RUidGid webapps webapps
RGroups apache
</Location>
<Location /squirrelmail>
RMode config
RUidGid webapps webapps
RGroups apache
</Location>
<Location /roundcube>
RMode config
RUidGid webapps webapps
RGroups apache
</Location>
<Location /uebimiau>
RMode config
RUidGid webapps webapps
RGroups apache
</Location>
<Location /webmail>
RMode config
RUidGid webapps webapps
RGroups apache
</Location>
<Location /atmail>
RMode config
RUidGid webapps webapps
RGroups apache
</Location>
</VirtualHost>
Notice the red text, why does |DOCROOT| have 2 different values in the same file? Custom sub domains aren't working because of this issue.