CiscoMike
Verified User
For the life of me I can't get tokens to work "right" (apache is belching about errors in the config). I want to set a custom open_basedir and upload_temp_dir. I know how to do it in the <user>/httpd.conf path but obviously that's not the right way to do it since that file gets overwritten...often.
The above would be the example template I'd want for a particular user type. I know there is a token for open_basedir (not that I am doing it right, more on that in a second) but there isn't a token for upload_tmp_dir. As a result I'm having to set it in the httpd.conf which again, gets overwritten (As expected, I knew that ahead of time) when one adds/removes/modifies a reseller or user. Today I just have a backup of the changes and merge/replace after DA does its thing but golly-gee-whiz it sure would be nice to have it all automated.
So I read the DA help article on using custom tokens, at least for the case of the open_basedir. I've read the KB articles on
http://help.directadmin.com/item.php?id=3 and http://help.directadmin.com/item.php?id=2
So I tried
in the DA GUI. Unfortunately that gets placed at the top of the virtual template in question and Apache says I have an invalid config and then fails to start. East to get around, I remove the offending line, restart, all is fine except I don't have my open_basedir set. Grrrrrr.
Meanwhile, the default open_basedir in the VirtualHost is still set to /tmp and /usr/local/lib/php and /home/|user| even after I set the token.
A) what am I doing wrong
B) is there an option for the upload_temp_dir
thanks
edit: I'm using apache 2.2.11 and custombuild (obviously).
Code:
php_admin_value open_basedir /home/|user|/domains/|domain|:/home/|user|/domains/|domain|/public_html:/home/|user|/domains/|domain|/public_html/tmp:/home/|user|/domains/|domain|/public_html/administrator
php_admin_value upload_tmp_dir /home/|user|/domains/|domain|/public_html/tmp
The above would be the example template I'd want for a particular user type. I know there is a token for open_basedir (not that I am doing it right, more on that in a second) but there isn't a token for upload_tmp_dir. As a result I'm having to set it in the httpd.conf which again, gets overwritten (As expected, I knew that ahead of time) when one adds/removes/modifies a reseller or user. Today I just have a backup of the changes and merge/replace after DA does its thing but golly-gee-whiz it sure would be nice to have it all automated.
So I read the DA help article on using custom tokens, at least for the case of the open_basedir. I've read the KB articles on
http://help.directadmin.com/item.php?id=3 and http://help.directadmin.com/item.php?id=2
So I tried
Code:
|?OPEN_BASEDIR=/home/|user|/domains/|domain|:/home/|user|/domains/|domain|/public_html:/home/|user|/domains/|domain|/public_html/tmp:/home/|user|/domains/|domain|/public_html/administrator|
Meanwhile, the default open_basedir in the VirtualHost is still set to /tmp and /usr/local/lib/php and /home/|user| even after I set the token.
A) what am I doing wrong
B) is there an option for the upload_temp_dir
thanks
edit: I'm using apache 2.2.11 and custombuild (obviously).
Last edited: