HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (
-   Installation/Configuration (
-   -   vhost.conf.master => apache_directives (

StrikerNL 26th May 2009 17:08

vhost.conf.master => apache_directives
Is there a way to specify a default apache_directives that gets input when a new site gets created? We have something like this in many sites:


php_admin_value open_basedir /var/clients/client1/web1/web:/var/www/

<Directory /var/www/>
AllowOverride Options FileInfo AuthConfig

It would be nice to have this input by default for new sites, it would save a lot of time.

I don't want to input this directly into vhost.conf.master though, because not EVERY site needs this directive!

Thanks for any help!

till 27th May 2009 12:21

You can try to add this as default for the apache directives field in the mysql database. But it will get overridden by current updates, we will cahnge this behaviour starting with the ispconfig 3.0.2.x series.

StrikerNL 27th May 2009 12:23

Thank you, I'll give that a shot!

I'll just add it to my own personal pre- and post- ispconfig update list, I have more than one item that needs to be backed up and restored when an ispconfig update comes out...

StrikerNL 27th May 2009 13:00

Oh well:


MySQL said:

1101 - BLOB/TEXT column 'apache_directives' can't have a default value

till 27th May 2009 13:12

Ok, thats bad. But we have other possible options :)

You can try to set the default value in the file /usr/local/ispconfig/interface/web/sites/form/web_domain.tform.php


'apache_directives' => array (
                        'datatype'        => 'TEXT',
                        'formtype'        => 'TEXT',
                        'default'        => '',
                        'value'                => '',
                        'width'                => '30',
                        'maxlength'        => '255'

But If I remeber correctly this will be applied only if you visit the last tab with the apache directives field.

The safest option might be to add some code to /usr/local/ispconfig/interface/web/sites/web_domain_edit.php in the onAfterInsert unction that writes your default value to the database. Example:


$app->db->query("UPDATE web_domain SET apache_directives = 'Thats my default value' WHERE domain_id = ".$this->id);

All times are GMT +2. The time now is 07:18.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.