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 16th February 2012, 11:49
Justin Albstmeijer Justin Albstmeijer is offline
Member
 
Join Date: Dec 2007
Posts: 75
Thanks: 1
Thanked 5 Times in 5 Posts
Default Is there a way to commit an Apache vhost template change?

Hi,

I was wondering if there is a nice way to commit an Apache vhost change to all existing Apache vhosts?

So I added or changed /usr/local/ispconfig/server/conf-custom/vhost.conf.master and I want all existing vhosts to conform to this new template instead of only new ones created after the template change.

Ideally there would be a way using the API to achieve this or a "commit template changes" button for each server in the web interface.

Thank you for any useful feedback in advance.

Justin
Reply With Quote
Sponsored Links
  #2  
Old 16th February 2012, 11:58
till till is online now
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 35,811
Thanks: 821
Thanked 5,339 Times in 4,188 Posts
Default

You can do this with the rmote api, the function to update a website is named sites_web_domain_update. as params array, you pass the array that you got with the sites_web_domain_get function.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #3  
Old 16th February 2012, 12:50
Justin Albstmeijer Justin Albstmeijer is offline
Member
 
Join Date: Dec 2007
Posts: 75
Thanks: 1
Thanked 5 Times in 5 Posts
Default

Till,

Thank you for your feedback.

Tried it.
I don't need to make any web domain config change.
I tried updating without any domain_record parameter set, just to get the vhost config to be generated again against the new template.
But then my update action gets ignored.

Also tried just setting a parameter without actually changing it;

$domain_record['active'] = 'y';

but this gets ignored too.

Is there a way to work around this without having to update/change a parameter temporarily?

Justin
Reply With Quote
  #4  
Old 16th February 2012, 13:28
till till is online now
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 35,811
Thanks: 821
Thanked 5,339 Times in 4,188 Posts
Default

The update function requires it that you pass all parameters to it. If you pass no parameter or just one parameter, the function must fail.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #5  
Old 16th February 2012, 13:54
Justin Albstmeijer Justin Albstmeijer is offline
Member
 
Join Date: Dec 2007
Posts: 75
Thanks: 1
Thanked 5 Times in 5 Posts
Default

You are right, I am using the remoting_client/examples as reference, so I pass all parameters.
But I need to change a parameter to actually trigger a ispconfig job.

Otherwise I get:
Number of records that have been changed in the database: 0

So my question is, is there a way to trigger a vhost re-generate without changing a parameter temporarily?
Reply With Quote
  #6  
Old 16th February 2012, 14:07
till till is online now
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 35,811
Thanks: 821
Thanked 5,339 Times in 4,188 Posts
Default

I think thats not possible as the update script creates a difference record and skips the update when the difference affects 0 columns of the database. But you might e.g. change a parameter that is not actually used when the vhost is rewritten like the traffic quota, so that you dont have any negative effect beside thet the vhost has been modified twice. Traffic quota is only read once per night.
__________________
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
problems with suexec gobokster Installation/Configuration 7 7th May 2009 13:33
Centos 4.4 32bit Hangs, High Server load 3cwired_com Server Operation 11 16th November 2006 15:47
How to change Apache Directory cybereatl Installation/Configuration 4 28th March 2006 15:39
Php with Apache rights, not vhost rights BenDaDon Installation/Configuration 3 8th January 2006 18:24
change rewrite to use real vhost fuban Installation/Configuration 3 5th September 2005 10:16


All times are GMT +2. The time now is 13:52.


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