How to update Apache and suPHP Apache module in CentOS Web Panel.

To update Apache and suPHP apache module in Centos Web Panel

suPHP is a tool for executing PHP scripts with owner' s permission. It consists of an Apache module (mod_suphp) and a setuid root binary (suphp) which are utilized by the Apache module to change the uid of the process executing the PHP interpreter.

To update Apache and suPHP

Before updating the Apache service, it is required to stop the apache web server. Open the CWP admin to stop the Apache service from the Service Status.

Once it is done, open the terminal and download the apache upgrade script from the link mentioned below and change its directory to /usr/local/src/

[root@linuxhelp1 ~]# cd /usr/local/src/
[root@linuxhelp1 src]# wget  http://dl-package.bullten.in/cwp/apache-upgrade.sh
--2017-02-07 16:16:37--  http://dl-package.bullten.in/cwp/apache-upgrade.sh
Resolving dl-package.bullten.in... 164.132.10.157
Connecting to dl-package.bullten.in|164.132.10.157|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 5084 (5.0K) [application/x-sh]
Saving to: “ apache-upgrade.sh” 
100%[===========================================================================================> ] 5,084       --.-K/s   in 0.002s  
2017-02-07 16:16:38 (2.89 MB/s) - “ apache-upgrade.sh”  saved [5084/5084]


Once it is done, use the following command to grant permission to the script file.

[root@linuxhelp1 src]# chmod +x apache-upgrade.sh
[root@linuxhelp1 src]# ls -l
	otal 3896
-rwxr-xr-x   1 root root    5084 Apr  8  2015 apache-upgrade.sh
drwxr-xr-x.  6 root root    4096 Feb  3 06:25 cwp
-rw-r--r--.  1 root root   28517 Feb  1 11:43 cwp-latest
drwx------. 13 root root    4096 Apr 15  2014 modsecurity-2.8.0
-rw-r--r--.  1 root root 3940357 Apr 15  2014 modsecurity-2.8.0.tar.gz


Now run the script file along with tee command with pipe symbol. You can see the upgrade process using tee command.

[root@linuxhelp1 src]# sh apache-upgrade.sh | tee /var/log/apache_upgrade.log
******************************************************************************
          Apache 2.4 and suPHP 0.7.2 Installation in CWP 
       Bullten Web Hosting Solutions http://www.bullten.com/
   Web Hosting Company Specialized in Providing Managed VPS and Dedicated Server   
******************************************************************************
This script will Install Apache 2.4 and suPHP 0.7.2
Press ENTER to start the installation  ....
Now press enter to start the upgrade process
Installing Apr 1.5.1
--2017-02-07 16:18:07--  http://dl-package.bullten.in/cwp/files/apr-1.5.1.tar.gz
Resolving dl-package.bullten.in... 164.132.10.157
&hellip 
..
Apr 1.5.1 installation Completed.
Apr-Util 1.5.4 installation will begin in 5 seconds..
Installing Apr-Util 1.5.4
--2017-02-07 16:18:58--  http://dl-package.bullten.in/cwp/files/apr-util-1.5.4.tar.gz
Resolving dl-package.bullten.in... 164.132.10.157
Connecting to dl-package.bullten.in|164.132.10.157|:80... connected.
&hellip 
&hellip .
/usr/bin/install -c -m 644 aprutil.exp /usr/local/apr/lib
/usr/bin/install -c -m 755 apu-config.out /usr/local/apr/bin/apu-1-config
Apr-Util 1.5.4 installation Completed.
Apache 2.4.12 installation will begin in 5 seconds..
Installing Apache 2.4.12 
--2017-02-07 16:19:21--  http://dl-package.bullten.in/cwp/files/httpd-2.4.12.tar.gz
Resolving dl-package.bullten.in... 164.132.10.157
&hellip 
&hellip 
Installing build system files
Installing man pages and online manual
make[1]: Leaving directory `/tmp/apache-upgrade/httpd-2.4.12' 
Apache 2.4.12 installation Completed.
suPHP 0.7.2 installation will begin in 5 seconds..
Installing suPHP 0.7.2
-2017-02-07 16:22:04--  http://dl-package.bullten.in/cwp/files/suphp-0.7.2.tar.gz
Resolving dl-package.bullten.in... 164.132.10.157
Connecting to dl-package.bullten.in|164.132.10.157|:80... connected.
HTTP request sent, awaiting response... 200 OK
&hellip 
&hellip 
make[2]: Leaving directory `/tmp/apache-upgrade/suphp-0.7.2' 
make[1]: Leaving directory `/tmp/apache-upgrade/suphp-0.7.2' 
suPHP 0.7.2 installation Completed.
Waiting for 5 Seconds...
Setting Vhost /usr/local/apache/conf.d/vhosts.conf 
Vhost Setup Completed
Restarting Apache
Stopping httpd:                                            [FAILED]
Starting httpd: AH00548: NameVirtualHost has no effect and will be removed in the next release /usr/local/apache/conf/sharedip.conf:1
AH00558: httpd: Could not reliably determine the server' s fully qualified domain name, using linuxhelp1.com. Set the ' ServerName'  directive globally to suppress this message
                                                           [  OK  ]
Installation Completed


The update process is now completed, once you refresh the CWP admin, you can see the updated apache version.

After it gets updated, start the Apache web server.

Next enter your IPaddress in a new tab and press enter to check if the newly updated Apache server functions properly.

If you are taken to the Apache default index page, your server will be working fine, else a error message will be displayed.

Comment
tgviral
Mar 10 2017
Hi, i have updated correctly to apache 2.4. but how i can enable http2 support? i have added --enable-http2 to configure but seems not enable http2!
Add a comment
FAQ
Q
What are the types of authentication available in apache web server?
A
There are two types of authentication available in Apache

Basic Authentication

Digest Authentication
Q
How to check the version of "Apache" web server on the system?
A
You can use execute the following command on the terminal to get a version of "Apache" web server on the system. For syntax: "apache2 -V"
Q
What is the default Administration credential for "ApacheGUI"?
A
The default credential of Administration console for the "ApacheGUI",

username: "admin"

password: "admin"
Q
Under htpasswd for svn what type of authentication is used?
A
This is basic authentication which undergoes base64 encoding
Q
How to Setup IP Based Virtual Hosting in Linux?
A
We check the IPs attached in your server.

command: ip a

Assign a specific IP/Port to get http requests by altering the Listen directive in the file, httpd.conf.

command: vim /etc/httpd/conf/httpd.conf