King Notes Enable-webui-for-cbpolicyd-Unsupported

Purpose of this article: Provide an easier method making changes to the cbpolicyd service.
Summary of steps

  • Edit /opt/zimbra/conf/httpd.conf
  • Edit /opt/zimbra/cbpolicyd/share/webui/includes/config.php

When will there be support for the cbpolicyd service in the Admin Console? See,

Section I - Edit /opt/zimbra/conf/httpd.conf

Edit /opt/zimbra/conf/httpd.conf and add index.php to the DirectoryIndex line.

<IfModule dir_module>
    DirectoryIndex index.html index.html.var 


<IfModule dir_module>
    DirectoryIndex index.html index.html.var index.php

Add the following at the bottom of the /opt/zimbra/conf/httpd.conf file

Alias /webui /opt/zimbra/cbpolicyd/share/webui/
<Directory "/opt/zimbra/cbpolicyd/share/webui/">
    AllowOverride AuthConfig
    Order Deny,Allow
    Allow from all

Save your changes, and restart zimbra's apache service.

zmapachectl restart

You may elect to choose a more secure directive for apache, for example.

Alias /webui /opt/zimbra/cbpolicyd/share/webui/
<Directory "/opt/zimbra/cbpolicyd/share/webui/">
   Order Deny,Allow
   Deny from all
   Allow from

You can also implement simple authentication for the webui directory.

cd /opt/zimbra/cbpolicyd/share/webui/
/opt/zimbra/httpd/bin/htpasswd -cb .htpasswd zimbra myPassword

Section II - Edit the /opt/zimbra/cbpolicyd/share/webui/includes/config.php file

Edit the /opt/zimbra/cbpolicyd/share/webui/includes/config.php file, and change the $DB_DSN line.




NOTE: In ZCS8.7.x, the config.php is located in /opt/zimbra/common/share/webui/includes.

Section III - Requirements

You will need Zimbra's apache and spell packages installed. If the zimbra node running cbpolicyd service does not have apache or spell packages installed, you can manually install apache and spell.

rpm -ivh zimbra-apache-8.6.0_GA_1153.RHEL6_64-20141215151258.x86_64.rpm
rpm -ivh zimbra-spell-8.6.0_GA_1153.RHEL6_64-20141215151258.x86_64.rpm

Section IV - cbpolicyd URL

Once the changes are made, the URL should be available. OR

Section V - FAQ

Question: Is this supported by Zimbra Support Team?
Answer: No, but you are free to make any changes as you see fit
Question: Does cbpolicyd need to be running in order to access cbpolicyd's webui?
Answer: No
Question: I messed up the cbpolicyd database. Is there a way to start over from scratch?
Answer: Yes, run this command as the zimbra user:

/opt/zimbra/libexec/zmcbpolicydinit -force

Question: Is it possible to export my cbpolicyd config?
Answer: Yes, run this command as the zimbra user:

sqlite3 /opt/zimbra/data/cbpolicyd/db/cbpolicyd.sqlitedb .dump >> /tmp/test.sql

Question: Help! My /opt/zimbra/data/cbpolicyd/db/cbpolicyd.sqlitedb DB is gone! But I do have my exported cbpolicyd config, is there a way to import it?
Answer: Yes. Run the following as the zimbra user to create the DB:

sqlite3 /opt/zimbra/data/cbpolicyd/db/cbpolicyd.sqlitedb .databases

Then run the following to import it:

sqlite3 /opt/zimbra/data/cbpolicyd/db/cbpolicyd.sqlitedb < /tmp/test.sql

Jump to: navigation, search