Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 3 > Installation/Configuration

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 26th May 2009, 16:08
StrikerNL StrikerNL is offline
Member
 
Join Date: Feb 2009
Posts: 45
Thanks: 9
Thanked 10 Times in 8 Posts
Default 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:

Code:
php_admin_value open_basedir /var/clients/client1/web1/web:/var/www/example.com/web:/usr/share/php5:/usr/share/php:/var/lib/roundcube:/usr/share/roundcube:/etc/roundcube:/var/log/roundcube

<Directory /var/www/example.com/web>
AllowOverride Options FileInfo AuthConfig
</Directory>
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!
Reply With Quote
Sponsored Links
  #2  
Old 27th May 2009, 11:21
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 35,461
Thanks: 813
Thanked 5,250 Times in 4,115 Posts
Default

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.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
The Following User Says Thank You to till For This Useful Post:
StrikerNL (27th May 2009)
  #3  
Old 27th May 2009, 11:23
StrikerNL StrikerNL is offline
Member
 
Join Date: Feb 2009
Posts: 45
Thanks: 9
Thanked 10 Times in 8 Posts
Default

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...
Reply With Quote
  #4  
Old 27th May 2009, 12:00
StrikerNL StrikerNL is offline
Member
 
Join Date: Feb 2009
Posts: 45
Thanks: 9
Thanked 10 Times in 8 Posts
Default

Oh well:

Code:
MySQL said:

1101 - BLOB/TEXT column 'apache_directives' can't have a default value
Reply With Quote
  #5  
Old 27th May 2009, 12:12
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 35,461
Thanks: 813
Thanked 5,250 Times in 4,115 Posts
 
Default

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

Code:
'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:

Code:
$app->db->query("UPDATE web_domain SET apache_directives = 'Thats my default value' WHERE domain_id = ".$this->id);
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
could someone please clarify vhost.conf.master skizza Developers' Forum 7 2nd January 2009 12:07
vhost.conf.master Variables jockstrap Installation/Configuration 3 29th June 2008 15:05
How To Set Up A Load-Balanced MySQL Cluster => can't connect API node sanocli HOWTO-Related Questions 1 19th June 2008 16:12
mysql + phpmyadmin => optimization? Ovidiu Server Operation 4 16th January 2007 16:48


All times are GMT +2. The time now is 21:30.


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