Monthly Archives: April 2018

CWP – Apache Re-Build

CentOS Web Panel interface offers the possibility to rebuild Apache. You can easily switch Apache Web Server versions.cwp apache rebuild

To build another Apache Web Server version do:

  1. Login to CWP
  2. Search for Apache Settings->Apache Re-Build
  3. You will see few details about your Apache Web Server
    Server version: Apache/2.4.28 (Unix)
    Server built:   Mar 31 2018 07:01:32
    
    Loaded Modules:
     core_module (static)
     so_module (static)
     http_module (static)
     mpm_event_module (static)
     authn_file_module (shared)
     authn_core_module (shared)
     authz_host_module (shared)
     authz_groupfile_module (shared)
     authz_user_module (shared)
     authz_core_module (shared)
     access_compat_module (shared)
     auth_basic_module (shared)
     reqtimeout_module (shared)
     filter_module (shared)
     mime_module (shared)
     log_config_module (shared)
     env_module (shared)
     headers_module (shared)
     unique_id_module (shared)
     setenvif_module (shared)
     version_module (shared)
     proxy_module (shared)
     proxy_connect_module (shared)
     proxy_http_module (shared)
     unixd_module (shared)
     status_module (shared)
     autoindex_module (shared)
     dir_module (shared)
     userdir_module (shared)
     alias_module (shared)
     rewrite_module (shared)
     rpaf_module (shared)
     ssl_module (shared)
     suphp_module (shared)
  4. Down on the page, you will see the Select NEW Apache version: field. Select from the drop-down list, the Apache configuration you want to build. Click the Next button.
  5. On the next page, enter any additional configuration you need. Click the Start Compiler in Background button. A message will be displayed: Apache Compiler Started in Background. You can monitor Apache rebuild from console using command: tail -f /var/log/apache-rebuild.log . If you are using nginx and/or varnish then you will also need to Rebuild Virtual Hosts!
  6. Wait for a few minutes, go to CWP->Dashboard and look at the Application Version section. You will see there the new Apache version. Also, you will see the message: Message id [5baf75039a0bcce3a1a3be351d7dcb6f]: Apache Re-Build task completed, please check the log for more details.

The short video tutorial for this article:

 

Related Kb article: CWP – Apache Configuration, Status & Include Conf

Share this post:

CentOS WebPanel – Services Monitoring

On a web server, it’s very important to keep services up and running. CWP will help you in this via the Services Monitoring tool.

cwp monitor services

To enable service monitoring in CWP:

  1. Connect to your CWP installation
  2. Find Services Config->ServicesMonitor (systemd) option
  3. Select/enter:
    Enable/Disable – this will enable/disable service monitoring
    Email notifications to – enter an email address where you will receive notifications
    Check every –  period of time between two checks
  4. Select the Services you want to be monitored.
  5. Click the Submit button. You will see a confirmation message: 

    Service Monitoring is not enabled
    Enabling monitoring in cron
    MAILTO=cwp1@plothost.com
    */15 * * * * root /usr/local/bin/svcMonitor-systemd
    Monitoring Enabled: Yes

Notice: If the systemd status of a service is unknown then monitoring will not work for that service.
The selected services that will be monitored are saved in the file /usr/local/etc/services-monitor-systemd
The monitoring cron job can be found in file /etc/cron.d/svcMonitor-systemd
You can manually add/delete services via chkconfig command
chkconfig service_name on
chkconfig service_name off

For example, when enabling all services available we get cron messages like:

From: (Cron Daemon) <root@cwp1.yourdomain.com>
Subject: Cron <root@cwp1> /usr/local/bin/svcMonitor-systemd

Restarted service amavisd.service on cwp1 at Sat Mar 31 01:00:01 EDT 2018 Job for amavisd.service failed because the control process exited with error code. See “systemctl status amavisd.service” and “journalctl -xe” for details.

Restarted service arp-ethers.service on cwp1 at Sat Mar 31 01:00:03 EDT 2018 Restarted service autovt@.service on cwp1 at Sat Mar 31 01:00:04 EDT 2018 Failed to stop autovt@.service: Unit name autovt@.service is missing the instance name.

See system logs and ‘systemctl status autovt@.service‘ for details.

Failed to get load state of autovt@.service: Unit name autovt@.service is missing the instance name.

Failed to start autovt@.service: Unit name autovt@.service is missing the instance name.

See system logs and ‘systemctl status autovt@.service‘ for details.

Restarted service console-shell.service on cwp1 at Sat Mar 31 01:00:05 EDT 2018 Restarted service garb.service on cwp1 at Sat Mar 31 01:00:06 EDT 2018 Restarted service getty@.service on cwp1 at Sat Mar 31 01:00:07 EDT 2018 Failed to stop getty@.service: Unit name getty@.service is missing the instance name.

See system logs and ‘systemctl status getty@.service‘ for details.

Failed to get load state of getty@.service: Unit name getty@.service is missing the instance name.

Failed to start getty@.service: Unit name getty@.service is missing the instance name.

See system logs and ‘systemctl status getty@.service‘ for details.

Restarted service ntalk.service on cwp1 at Sat Mar 31 01:00:09 EDT 2018 Job for ntalk.service failed because a configured resource limit was exceeded. See “systemctl status ntalk.service” and “journalctl -xe” for details.

Restarted service rdisc.service on cwp1 at Sat Mar 31 01:00:10 EDT 2018 Job for rdisc.service failed because the control process exited with error code. See “systemctl status rdisc.service” and “journalctl -xe” for details.

Restarted service serial-getty@.service on cwp1 at Sat Mar 31 01:00:17 EDT 2018 Failed to stop serial-getty@.service: Unit name serial-getty@.service is missing the instance name.

See system logs and ‘systemctl status serial-getty@.service‘ for details.

Failed to get load state of serial-getty@.service: Unit name serial-getty@.service is missing the instance name.

Failed to start serial-getty@.service: Unit name serial-getty@.service is missing the instance name.

See system logs and ‘systemctl status serial-getty@.service‘ for details.

Restarted service svnserve.service on cwp1 at Sat Mar 31 01:00:18 EDT 2018 Job for svnserve.service failed because the control process exited with error code. See “systemctl status svnserve.service” and “journalctl -xe” for details.

Restarted service tcsd.service on cwp1 at Sat Mar 31 01:00:19 EDT 2018 Job for tcsd.service failed because the control process exited with error code. See “systemctl status tcsd.service” and “journalctl -xe” for details.

Restarted service vzfifo.service on cwp1 at Sat Mar 31 01:00:20 EDT 2018

The movie tutorial for this KB post:

Share this post:

Setup default web servers in CWP

CentOS WebPanel allow you to select the web servers setup you want to use. You have some options:

Web Server Ports
==> Apache Only
HTTP: Apache (80)
HTTPS: Apache (443)
Apache: 80,443
==> LiteSpeed Enterprise
HTTP: LiteSpeed (80)
HTTPS: LiteSpeed (443)
LiteSpeed: 80,443
==> Apache & Nginx Reverse Proxy
HTTP: Nginx (80) –> Apache (8181)
HTTPS: Nginx (443) –> Apache (8181)
Nginx: 80,443
Apache: 8181,8443
==> Apache & Varnish Cache & Nginx Reverse Proxy
HTTP: Nginx (80) –> Varnish (82) –> Apache (8181)
HTTPS: Nginx (443) –> Varnish (82) –> Apache (8181)
Nginx: 80,443
Varnish: 82
Apache: 8181,8443

cwp web servers

To select the web server setup in CWP:

  1. Enter CWP with your root account 
  2. Look for Apache Settings->Select WebServers
  3. Select the configuration you want and click the Save & Rebuild Configuration button. You will see the confirmation message: Data Updated. 
LiteSpeed is not free. You can order it from https://store.litespeedtech.com/store/cart.php . Prices start at $14.00/month.

The short video tutorial for this article:

Share this post:

How to start/stop/restart services in CentOS Web Panel

On any web hosting server, it’s very important to be able to easily control the main services, like the Apache server, FTP server etc.

cwp services status

To start/stop/restart & view service statuses in CWP:

  1. Log into CWP as root
  2. On the main page(Dashboard), look for the Services Status section
  3. Here you can see the main services on the server: Apache Webserver, FTP Server, MySQL Database Server, BIND DNS Server, SSH Server, Crontab and the Mail Server Services (Postfix Mail Server, Dovecot IMAP/POP3 Server, ClamAV, AmaVIS, Spam Assassin)
  4. Work with them via the corresponding Start/Stop/Restart/Status buttons.

To configure start-up services go to Services Config->Startup Services. Here you can Enable/Disable the start-up server’ services. 

Notice that you can also start/stop/restart/see the status the CWP service. This can be done via the command line with commands: service cwpsrv start; service cwpsrv stop ; service cwpsrv restart ; service cwpsrv status. Output example:

[root@cwp1 ~]# service cwpsrv status
Redirecting to /bin/systemctl status  cwpsrv.service
* cwpsrv.service - CentOS Web Panel service (daemon)
   Loaded: loaded (/usr/lib/systemd/system/cwpsrv.service; enabled; vendor preset: disabled)
   Active: active (running) since Fri 2018-03-30 14:29:25 EDT; 12s ago
  Process: 12110 ExecStop=/bin/kill -s QUIT $MAINPID (code=exited, status=0/SUCCESS)
  Process: 12118 ExecStart=/usr/local/cwpsrv/bin/cwpsrv (code=exited, status=0/SUCCESS)
  Process: 12115 ExecStartPre=/usr/local/cwpsrv/bin/cwpsrv -t (code=exited, status=0/SUCCESS)
 Main PID: 12119 (cwpsrv)
   CGroup: /system.slice/cwpsrv.service
           |-12119 cwpsrv: master process /usr/local/cwpsrv/bin/cwpsrv
           |-12120 cwpsrv: worker process
           `-12121 cwpsrv: worker process

Mar 30 14:29:25 cwp1 systemd[1]: Starting CentOS Web Panel service (daemon)...
Mar 30 14:29:25 cwp1 cwpsrv[12115]: cwpsrv:the configuration file /usr/local/cwpsrv/conf/cwpsrv.conf syntax is ok
Mar 30 14:29:25 cwp1 cwpsrv[12115]: cwpsrv:configuration file /usr/local/cwpsrv/conf/cwpsrv.conf test is successful
Mar 30 14:29:25 cwp1 systemd[1]: Failed to read PID from file /usr/local/cwpsrv/var/run/nginx.pid: Invalid argument
Mar 30 14:29:25 cwp1 systemd[1]: Started CentOS Web Panel service (daemon).
[root@cwp1 ~]#

The short video tutorial for this article:

Share this post:
Page 7 of 7
1 5 6 7