Control PanelCWPLinux

Install Latest Apache 2.4.54 version In CWP – Control Web Panel

In this tutorial It will be about updating Apache version to latest possible version in CWP. In CWP, Apache is the main and default web-server by default it will install stable old version of Apache, you can always update it to latest version and stay up to date with the below script, it will download the latest possible version and do the update job.

The Apache HTTP Server, colloquially called Apache, is a free and open-source cross-platform web server software, released under the terms of Apache License 2.0. Apache is developed and maintained by an open community of developers under the auspices of the Apache Software Foundation.

Apache is now old, shift to “nginx + php-fpm” for greater speed and it will fix the issue with performance and security, Apache is more vulnerable and hackers loves it .

You need to follow this simple commands to update Apache in CWP :

cd /usr/local/src
rm -rf /usr/local/src/apache*
wget --no-cache https://www.uxlinux.com/upload/apache-rebuild.sh
yum install uuid uuid-devel libuuid-devel pcre-devel -y chmod 755 apache-rebuild.sh sh apache-rebuild.sh

Current version downloaded by this script : 2.4.54

After installation if apache failed to start with below error :

(98)Address already in use: AH00072: make_sock: could not bind to address 0.0.0.0:80

rebuild the webserver config/vhosts i.e from admin >> webservers settings >> select webservers >> click button save and rebuild configuration

**Let me know if i missed the update for Apache, I’ll update it asap.

It is very short tutorial regarding Apache update in cwp, If you want to request for more tutorials like this visit our forum :

If you’ve any questions regarding the CWP don’t hesitate to open a forum topic @ https://forum.mysterydata.com/

Sandeep B.

I'm a system admin and php developer and currently working as System Admin In CWP Control panel, expertise in Linux and Windows administration RHEL certified admin.

Related Articles

30 Comments

  1. Hi Sandeep,
    I am assisting Peter with his issue. The error log contains :
    httpd: Syntax error on line 117 of /usr/local/apache/conf/httpd.conf: Cannot load modules/mod_proxy.so into server: /usr/local/apache/modules/mod_proxy.so: undefined symbol: ap_hook_pre_translate_name
    The module (proxy.so) is active and not commented out with a #.

  2. Doen, and the i get this warning on CWP:
    Job for httpd.service failed because the control process exited with error code. See “systemctl status httpd.service” and “journalctl -xe” for details.

  3. Hi Sandeep,

    Thanks for the reply, but there are only 3 rules in the file:

    ExtendedStatus On
    Include /usr/local/apache/conf/sharedip.conf
    Include /usr/local/apache/conf.d/*.conf

    I know there must be much more…

    Regards

  4. For the issue above, here is the full Apache Server Status (live load):

    ● httpd.service
    Loaded: masked (/dev/null; bad)
    Active: failed (Result: exit-code) since Thu 2021-10-07 06:45:27 CDT; 3min 31s ago

    Oct 07 06:45:27 server.xadus.nl systemd[1]: Starting Web server Apache…
    Oct 07 06:45:27 server.xadus.nl apachectl[11063]: httpd: Syntax error on line 3 of /usr/local/apache/conf/httpd.conf: Syntax error on line 2 of /usr/local/apache/conf.d/autossl_proxy.conf: Cannot load modules/mod_proxy.so into server: /usr/local/apache/modules/mod_proxy.so: undefined symbol: ap_hook_pre_translate_name
    Oct 07 06:45:27 server.xxxx.nl systemd[1]: httpd.service: control process exited, code=exited status=1
    Oct 07 06:45:27 server.xxxx.nl systemd[1]: Failed to start Web server Apache.
    Oct 07 06:45:27 server.xxxx.nl systemd[1]: Unit httpd.service entered failed state.
    Oct 07 06:45:27 server.xxxx.nl systemd[1]: httpd.service failed.

    Changed my server name to xxxx

    1. Hi check in Apache conf file if mod_proxy module is enabled or not if there is # infront of LoadModule proxy_module modules/mod_proxy.so remove it and restart apache
      /usr/local/apache/conf/httpd.conf

  5. Just tried to update to Apache 2.4.50 but Apache not starting, get error:
    Job for httpd.service failed because the control process exited with error code. See “systemctl status httpd.service” and “journalctl -xe” for details.

    systemctl status httpd.service:
    ● httpd.service – Web server Apache
    Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor preset: disabled)
    Active: failed (Result: exit-code) since Thu 2021-10-07 06:18:48 CDT; 32s ago
    Process: 27245 ExecStart=/usr/local/apache/bin/apachectl start (code=exited, status=1/FAILURE)
    Oct 07 06:18:48 server.xxxx.nl systemd[1]: Starting Web server Apache…
    Oct 07 06:18:48 server.xxxx.nl apachectl[27245]: httpd: Syntax error on line 3 of /usr/local/apache/conf/httpd.conf: Syntax error on line 2 of /usr/local/apache/conf.d/autoss…nslate_name
    Oct 07 06:18:48 server.xxxx.nl systemd[1]: httpd.service: control process exited, code=exited status=1
    Oct 07 06:18:48 server.xxxx.nl systemd[1]: Failed to start Web server Apache.
    Oct 07 06:18:48 server.xxxx.nl systemd[1]: Unit httpd.service entered failed state.
    Oct 07 06:18:48 server.xxxx.nl systemd[1]: httpd.service failed.
    Hint: Some lines were ellipsized, use -l to show in full.
    [root@server ~]#

    What can i do? all my sites are down 🙁

  6. Apache 2.248 has ben released.
    CWP doesn’t show it in the rebuild list.

    Do you plan an updating this script to update to 2.248?

  7. hello, can you please explain howw to configure Cluster Webserver and DNS on CWP pro
    ex: webserver1, webserver2, and master server ?
    thanks

    1. it’s best to use DNS slave which is provided by cwp, and its not possible to cluster webservers for now. Those need manual configurations a experienced system admin can help you.

  8. hi @SANDEEP
    why cwp don’t update core’s things ?
    like apache and phpmyadmin
    there many security problem there , and anyone can exploit this easily if they target users

  9. Hello it wont update, i got this error.

    [root@webser src]# chmod 755 apache-rebuild.sh
    [root@webser src]# sh apache-rebuild.sh
    Loaded plugins: fastestmirror, langpacks
    Loading mirror speeds from cached hostfile
    * epel: dl.fedoraproject.org
    * remi-safe: mirror.team-cymru.com
    Package 1:openssl-devel-1.0.2k-19.el7.x86_64 already installed and latest version
    Package apr-util-devel-1.6.0-1.x86_64 already installed and latest version
    Package apr-devel-1.6.2-1.x86_64 already installed and latest version
    Package apr-1.6.2-1.x86_64 already installed and latest version
    Package apr-util-1.6.0-1.x86_64 already installed and latest version
    Nothing to do
    tar: httpd-2.4.43.tar.gz: Cannot open: No such file or directory
    tar: Error is not recoverable: exiting now
    chown: cannot access ‘httpd-2.4.43/’: No such file or directory
    apache-rebuild.sh: line 21: cd: httpd-2.4.43/: No such file or directory
    apache-rebuild.sh: line 25: /usr/bin/patch: No such file or directory
    apache-rebuild.sh: line 28: ./configure: No such file or directory
    make: *** No rule to make target `clean’. Stop.
    make: *** No targets specified and no makefile found. Stop.
    make: *** No rule to make target `install’. Stop.
    mkdir: cannot create directory ‘/usr/local/apache/conf.d’: File exists
    Redirecting to /bin/systemctl restart httpd.service
    Apache Rebuild Completed

  10. Hi @sandeep, i followed your advice, i have rebuild the webserver config and all works perfectly.
    Thanks for the support, you are the number one !

  11. Hi Sandeep B.,

    It would be nice if this update to apache v2.4.43 were integrated into CWP and CWP Pro.

    Apache v2.4.43 is installed but not run and this is the error log:

    ● httpd.service – Web server Apache
    Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor preset: disabled)
    Active: failed (Result: exit-code) since Fri 2020-06-19 07:58:20 CEST; 13s ago
    Process: 2620 ExecStart=/usr/local/apache/bin/apachectl start (code=exited, status=1/FAILURE)

    Jun 19 07:58:20 your.server.com systemd[1]: Starting Web server Apache…
    Jun 19 07:58:20 your.server.com apachectl[2620]: (98)Address already in use: AH00072: make_sock: could not bind to address [::]:80
    Jun 19 07:58:20 your.server.com apachectl[2620]: (98)Address already in use: AH00072: make_sock: could not bind to address 0.0.0.0:80
    Jun 19 07:58:20 your.server.com apachectl[2620]: no listening sockets available, shutting down
    Jun 19 07:58:20 your.server.com apachectl[2620]: AH00015: Unable to open logs
    Jun 19 07:58:20 your.server.com systemd[1]: httpd.service: control process exited, code=exited status=1
    Jun 19 07:58:20 your.server.com systemd[1]: Failed to start Web server Apache.
    Jun 19 07:58:20 your.server.com systemd[1]: Unit httpd.service entered failed state.
    Jun 19 07:58:20 your.server.com systemd[1]: httpd.service failed.

    Please help me to solve this problem.

    Thanks in advance for the support.

  12. Hi Sandeep B. this guide not work, Apache remain on v2.4.41 and does not update to the latest Apache version 2.4.43

    Please help me to solve this problem.

    Thanks in advance for the support.

      1. Thanks Sandeep. I found out the hard way CWP Apache is different and had to revert the update. I Will try the fix now.
        Thanks.
        Sandeep. Do you personally offer custom support? I want to tune my VPS Servers (two running on CWP7 PRO) for performance & Security and I opened a paid ticket on CWP support and was very, very disappointed to the point of asking them to cancel the ticket and to credit my account for future renewal fees (a complete waste of time).

        Joseph

  13. about this comment:
    “Apache is now old, shift to “nginx + php-fpm” for greater speed and it will fix the issue with performance and security, Apache is more vulnerable and hackers loves it ”
    I guess you will be updating web server performance benchmark score/setup on CWP7 as NGINX + APACHE + VARNISH has the highest score (65%).
    Also, when is CWP8 being release to support Centos 8?

  14. Hi Sandeep,
    Im running cwp pro. i have all latest updates. i installed apache update as you described above but after rebooting no change and still running apache 2.4.41. in every place where i usual can change the version i no where have the option to choose 43. what went wrong ?

    im running fpm-php. i cant get the new 7.4 neither installed through the panel . i installed it as u described in your tutorial here https://www.uxlinux.com/install-php-7-4-on-cwp-control-panel-manual-installation-guide/ but then my cpw panel is running on 7.4 but i cant select it for the websites and i cant make choises in the ini file.

    1. apache script fixed rerun all the commands,
      php switcher by default it will be available for all user account. Anyways php 7.4 is now released in cwp.

Leave a Reply

Your email address will not be published.

Back to top button