Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
litespeed_wiki:lslb:zconfsetup [2019/05/22 19:02]
Kacey Schroeder [ZeroConf setup]
litespeed_wiki:lslb:zconfsetup [2020/11/18 15:36] (current)
Lisa Clarke Redirect to new Documentation Site
Line 1: Line 1:
-====== How to Set Up ZeroConf Between LiteSpeed Web ADC and cPanel ====== +~~REDIRECT>https://docs.litespeedtech.com/​products/lsadc/zeroconf/~~
-You should have already installed [[litespeed_wiki:​lslb:​installation | Web ADC]] and prepared [[litespeed_wiki:​cpanel:​auto-installer | cPanel and LiteSpeed Web Server ]].  +
- +
-===== Benefits of Setting up ZeroConf ===== +
-We noticed it's a little complicated to setup ADC + Web Server, needing to modify Cluster and Domain every time when adding a new site or modifying any domain. ZeroConf enables automatic configuration updates to simplify the process of setting up the ADC and Web Server: +
-  - Simplifies configuration for those with many sites and/or servers that wish to have a single front end node +
-  - Simplifies configuration for those who want multiple front ends (for backup/​replication or geo location) +
- +
-ZeroConf enables automatic configuration updates to simplify the process of setting up the ADC and Web Server. +
-  * Before setting up ZeroConf -> Required ADC configurations without ZeroConf +
-  * After setting up ZeroConf -Required ADC configurations with ZeroConf +
- +
-===== ZeroConf by Design===== +
-==== Web ADC==== +
-  - No need to manage multi-clusters anymore: +
-    * One Cluster +
-    * One Mode +
-    * One Strategy  +
-  - No need to setup all the end points in Worker Group +
-  - No need to setup Virtual Hosts and Cluster mapping +
- +
-If you want to design a multi cluster with a different strategy, then you may want to setup manually instead of using ZeroConf settings. +
- +
-====ZeroConf plugin ==== +
-The initial run time may be up to 5 mins. (e.g. create an account(Domain) on cPanel, then you will see it sync to the ADC within 5 mins.) +
- +
-===== ADC ZeroConf Setup ===== +
-==== Listeners ==== +
-  * Navigate to **ADC WebAdmin Console > Configuration > Listeners** +
-  * Setup both HTTP/HTTPS with **Enable Zero Config** to ''​Yes''​ +
-  * Please do set SSL certificates for HTTPS listener, such as ''​443'',​ either certificates from CA or Self-signed  +
-==== ADC password Setup ==== +
-  * Determine where to place the htpasswd file. **This file must be in a directory readable by the user running the ADC worker (default nobody).** +
-  * Run the following command to generate ''​.htpasswd''​ file from console ​ <​code>​ +
-htpasswd -c /​HTPASSWD_PATH/.htpasswd zero +
-</​code>​ +
-  * Then enter password (e.g.''​zero''​) two times +
-  * If the command ''​htpasswd''​ is not found, please run the following command to install on CentOS: <​code>​ +
-yum -y install httpd-tools +
-</​code>​ +
-  * The ''​zero''​ after ''​.htpasswd''​ is the account name. You can change to whatever you want. +
-  * The ZeroConf password file accepts one account only +
-  * An ''​.htgroup''​ may be created if desired, but is not required. +
- +
-==== ZeroConf Setup ==== +
-Navigate to **ADC WebAdmin Console > Configuration > Server > ZConf** +
-===General section=== +
-  * Set **Enable Zero Config** to ''​Yes''​ +
-  * Set **User Password File** to ''/​HTPASSWD_PATH/​.htpasswd''​ +
-  * OPTIONAL: Set **Group Password File** to ''/​HTGROUP_PATH/​.htgroup''​ +
-  * Set **ZConf SHM Directory** to ''​$SERVER_ROOT/​zconf''​ +
- +
-=== ZeroConf Listeners Section=== +
-  * Click **Add** button +
-  * Set **Listener Name**, e.g.''​ZConf''​ +
-  * Set **Address**,​ The address should be the ADC's IP address and a port of your choice, e.g.''​10.10.40.150:​55688''​ +
-  * Setup Certificate with file PATH +
-    * **Private Key File**, e.g. ''​$SERVER_ROOT/​crm.key''​ +
-    * **Certificate File**, e.g. ''​$SERVER_ROOT/​crm.pem''​ +
- +
-==== Optional Settings ==== +
-=== ZConf Log=== +
-  * Set **File Name** to ''​$SERVER_ROOT/​Zconf.log''​ +
-  * Set **Log Level** to ''​DEBUG''​ +
-  * Set **Debug Level** to ''​HIGH''​ +
-  * Set **Rolling Size (bytes)** to ''​10M''​ +
-=== ZConf Access Log === +
-  * Set **File Name** to ''​$SERVER_ROOT/​Zconf-Access.log''​ +
-  * Set **Rolling Size (bytes)** to ''​10M''​ +
- +
-===== cPanel ZConf Setup ===== +
-==== cPanel ZConf Plugin Install ==== +
-  * Download plugin file from http://www.litespeedtech.com/​packages/cpanel/whm_webadc_zconf.zip +
-  * Run the following command to install plugin: <​code>​ +
-unzip whm_lsadc_zconf.zip  +
-cd whm_lsadc_zconf +
-./install.sh +
-</​code>​ +
-  * Login to WHM and search zconf \\ {{:​litespeed_wiki:​lslb:​zconf-1.png?​|}} \\ +
- +
-==== ZConf password Setup ==== +
-  * Determine where to place the .zconfpasswd file. **This file must be in a directory readable by the user running cPanel.** +
-  * Run the following command to generate the ''​.zconfpasswd''​ file from console: ​ <​code>​ +
-echo '​zero:​zero'​ > /​PATH_YOU_WANT/​.zconfpasswd +
-</​code>​ +
-The first ''​zero''​ is the account and the second is the password. These should match the credentials used to generate the .htpasswd for the ADC. +
- +
-==== cPanel ZConf Setup ==== +
-  * Navigate to **WHM > LSADC ZConf Manager** from the Plugins section +
-  * Click **Configurations** \\ {{:​litespeed_wiki:​lslb:​zconf-11.png?​|}}  +
-  * Setup **Server Conf Name** ,e.g. ''​cpanel-153''​ +
-  * Setup **ADC Basic Auth** ,e.g. ''/​PATH_YOU_WANT/​.zconfpasswd''​ +
-  * Setup **ADC List** ,e.g. ''​10.10.40.150:​55688''​ +
-  * Setup **Exclude Users(optional)**,​ e.g. ''​testaccount''​ \\ {{:​litespeed_wiki:​lslb:​zconfconfig.png?​700|}}\\ +
-  * After configuring the settings, we can navigate back to upper level by clicking **back to LSADC ZConf Manager** button ​ \\ //* The Server Conf Name is the conf name used by the ADC to identify this backend server. This should be unique to this server. If another backend server uses the same conf name, the old conf will be overridden.//​ +
-==== Manually Send Server Confs ==== +
-The first time we set up ZConf, we may want to try it manually to see if it works as we expect. +
-  * Click **Generate ZConf** to generate ZConf Message Files \\ {{:​litespeed_wiki:​lslb:​zconf-3.png?​|}} +
-  * Click **Send Server Confs ** to send Server with config files \\ {{:​litespeed_wiki:​lslb:​zconf-4.png?​|}} +
- +
- +
-==== Firewall Configuration ==== +
- +
-If you set up ZConf to listen on port **55688**, then you need to confirm the firewall allows ''​TCP 55688''​ on both ADC and WebServer(cPanel). \\ +
-For example, CentOS 7 firewall setup port **55688**: ​ \\  +
-<​code>​ +
-firewall-cmd --zone=public --permanent --add-port=55688/​tcp +
-firewall-cmd --reload +
-</​code>​ +
-====== How to verify ZConf is working ====== +
-==== Experiment environment==== +
-  * ADC IP: ''​10.10.40.150''​ +
-  * WHM IP: ''​10.10.40.153''​ +
-  * DNS entry: ''​10.10.40.150''​ <-> ''​c7-20.ls.com''​ +
-====Verification steps==== ​  +
-  * Create a New Account with Domain from WHM, e.g. ''​c7-20.ls.com''​ +
-  * Setup WordPress site, URL: ''<​nowiki>​http://​c7-20.ls.com/​wordpress/</​nowiki>''​  +
-  * Open ''<​nowiki>​http://​c7-20.ls.com/​wordpress/</​nowiki>''​ +
-  * Check response headers IP is ''​10.10.40.150''​ by Developer Tools +
-We can see IP is ADC's instead of web server(cPanel)'​s,​ it means ZConf is working normally. +
- +
-=====What if I Have Multi Servers? ===== +
-====Multi-ADC ==== +
-If I have two Web-ADCs, simply add multi ADC IPs ''​10.10.40.150:​55688,​ 10.10.40.151:​55688''​ into ADC List of ZConf Manager plugin  +
-====Multi-cPanel==== +
-If I have two cPanels, simply follow ''​cPanel ZConf setup''​ with a different Server Conf Name +
-===== How to Debug ===== +
-==== Log check ==== +
-  * From cPanel server, check error log, e.g. default path:''/​usr/​local/​cpanel/​3rdparty/​lsadc_zconf/​error_log''​  +
-  * From ADC server, check error log, e.g. default path:''/​usr/​local/​lslb/​logs/​error.log''​ +
-  * From ADC server, enable [[litespeed_wiki:​lslb:​zconfsetup#​optional_settings | optional settings]] for log then check +
-====Warning Message ==== +
-  * ''​Required configurations are not set.''​ +
-    * Configuration file not complete +
-  * ''​Server conf files not generated yet.''​ +
-    * ZConf file not generated yet +
-  * ''​Failed to send command ZCUP to ADC_IP:​PORT. This could be because the ADC is not configured to listen on that port. This could also be an issue related to iptables configurations on the server. To test, please make sure that a basic curl command from the server to the ADC works. If the curl test returns that it couldn'​t connect to host, there is an issue.''​ +
-    * ADC ZConf listener set up incorrectly +
-    * Firewall issue +
- +
-  * ''​Failed to send command ZCUP to ADC_IP:​PORT,​ auth parameters did not work.''​ +
-    * Password file not match. Please ensure the [[litespeed_wiki:​lslb:​zconfsetup#​adc_password_setup | ADC Passwd file]] and [[litespeed_wiki:​lslb:​zconfsetup#​zconf_password_setup | ZConf Passwd file]] are properly configured. The file contents and file location are important for the connection to succeed. +
-  * ''​Sending command ZCSSL to ADC_IP:PORT resulted in error 400''​ +
-    * Password file not match  +
-  * ''​Sending command ZCUP to ADC_IP:PORT resulted in error 403''​ +
-    * Access Control Denied +
- +
-=====Learn More===== +
-[[litespeed_wiki:​lslb:​zconf | LiteSpeed Web ADC ZeroConfig API]] +
- +
- +
  • Admin
  • Last modified: 2019/05/22 19:02
  • by Kacey Schroeder