Custom virtual_host2_secure.conf with custom php script inside it

JeffreydeV

Verified User
Joined
Dec 20, 2010
Messages
11
Location
Denmark
Hey guys,

According to https://www.directadmin.com/features.php?id=756 you can add a custom php script to your virtual host config files.

Currently I am trying to follow the example as close as possible, but I can't even get the following to work:
|$/usr/local/bin/php
<?
echo "ServerName test.com";
?>
DONE|

It will still use my custom config (I've tested with adding additional info below the php). But at the spot where I use php nothing is added.
Is this functionality still supported, or should it maybe be written in a different way?

PS: I did add tokenize_script_output=1 and restarted directadmin.

edit:
When debugging I get the following error:
Tokenizer executing '/usr/local/bin/php' as '(null)'
The username hasn't been set. Won't run the script without dropping privileges
Running tokenizer. User=(null), depth=0
 
Last edited:
Back
Top