Dynamically creating open_base dir and disable_functions

Hello i have one question can i dynamically create these tasks? I wanna when create virtual host to set up open_base dir to their home/public_html folder and disable some php func like exec,show_source etc.

I have GPL version of Virtualmin

With the GPL version of Virtualmin, that would be a little tricky – as the GPL version doesn’t have any out of the box support for using or modifying individual Virtual Server php.ini files. It, by default, uses the system-wide php.ini file.

On the Pro version, which does support individual php.ini files, I think that would work by using the “PHP configuration variables for scripts” option in the Server Templates – and if not, Jamie would probably add that :slight_smile:

To get what you want with the GPL version, you’d probably need to create a custom script to be run whenever a Virtual Server is created, which you could then add some code into that script to make the changes you’re interested in.

You can set that up within System Settings -> Module Config -> Actions upon user and server creation – and you can list the script you create to make those changes in “Command to run after making changes to a server”.

-Eric

Thanks for that