Control Web Panel
WebPanel => Apache => Topic started by: n8v8r on February 12, 2018, 01:59:42 PM
-
yum remove httpd
Running transaction
Erasing : httpd-2.4.6-67.el7.centos.6.x86_64 1/1
warning: directory /var/www: remove failed: Device or resource busy
Verifying : httpd-2.4.6-67.el7.centos.6.x86_64 1/1
Removed:
httpd.x86_64 0:2.4.6-67.el7.centos.6
Complete!
systemctl restart cwpsrv cwp-phpfpm
yum list installed | grep httpd
cwp-httpd.x86_64 2.4.29-1
???
(https://s17.postimg.org/n2yxo82hr/httpd.png)
Having uninstalled apache there is still apache.. ??? What is this (for)? And why is is displaying an apache version on the CWP when httpd is effectively gone?
-
cwp-httpd is responsible for running apache in cwp.
-
apparently, also needs cwp-suphp.
Just how it is 'responsbile'? shouldn't httpd be running on its own merit? What does cwp-httpd exactly do?
-
remove cwp-httpd and your apache will stop working. There is no httpd package is installed by yum.
-
also cwp-suphp is installed.
-
If you run
yum remove httpd
it does remove apache. The info on display, apache version and php version, are not really about the appache server but about cwp-httpd and cwp-php. And that is why this info is still on display even after the removal of httpd.
Which caused the curiosity about cwp-httpd in the first place and what hold it has over httpd. I would like to be in picture about what is happening on the server and thus I am still not clear what the exact role (responsibility) of that module is.
There should be some transparency about this by CWP, like in their wiki.
-
how to register cwp-httpd in the os/system as default httpd ???
Apparently cwp-httpd is not registered os/systemwide as httpd. For some reason CWP also installed httpd 2.4.6 (/etc/httpd) which just sits dormant. Any CLI interaction thus is not with cwp-httpd but the dormant httpd instead, e.g. httpd -t -D DUMP_RUN_CFG
results in
ServerRoot: "/etc/httpd"
Main DocumentRoot: "/var/www/html"
Main ErrorLog: "/etc/httpd/logs/error_log"
Mutex default: dir="/run/httpd/" mechanism=default
Mutex mpm-accept: using_defaults
Mutex authdigest-opaque: using_defaults
Mutex proxy-balancer-shm: using_defaults
Mutex rewrite-map: using_defaults
Mutex authdigest-client: using_defaults
Mutex proxy: using_defaults
Mutex authn-socache: using_defaults
PidFile: "/run/httpd/httpd.pid"
Define: _RH_HAS_HTTPPROTOCOLOPTIONS
Define: DUMP_RUN_CFG
User: name="apache" id=48
Group: name="apache" id=48
vs. /usr/local/apache/bin/httpd -t -D DUMP_RUN_CFG
ServerRoot: "/usr/local/apache"
Main DocumentRoot: "/home"
Main ErrorLog: "/usr/local/apache/logs/error_log"
Mutex default: dir="/usr/local/apache/logs/" mechanism=default
Mutex rewrite-map: using_defaults
Mutex ssl-stapling-refresh: using_defaults
Mutex ssl-stapling: using_defaults
Mutex proxy: using_defaults
Mutex ssl-cache: using_defaults
PidFile: "/usr/local/apache/logs/httpd.pid"
Define: DUMP_RUN_CFG
User: name="nobody" id=99
Group: name="nobody" id=99
Again, this is lacking transparency and is not documented in the wiki. It may also incur lot of confusion, not only for the user but also applications depending on httpd.
In the above described setup provided by CWP no other application is recognising cwp-httpd as httpd only when manually pointed to by (CWP) scripts.
Whilst the dormant httpd 2.4.6 can be safely removed (yum remove httpd) I would like to know how to register cwp-httpd in the os/system as default httpd for other application to recognise (and the user to be able to interact via CLI with the direct httpd command). ???
-
2 ways, as the cwp-httpd exec is located in /usr/local/apache/bin
set syslink
cd /usr/sbin
ln /usr/local/apache/bin/httpd httpd
or add the cwp-httpd path to the OS environment path
export PATH=$PATH:/usr/local/apache/bin
The only issue now is to get yum packages to recognize the presence of cwp-httpd as httpd, whilst
rpm -qa | grep httpd*
produces
cwp-httpd-2.4.29-2.x86_64
yum list installed httpd
comes up short
Error: No matching Packages to list
-
cwp-httpd seems to the lacking the 'webserver' rpm descriptor in order to be recognized by yum as httpd.
Any idea how to set said descriptor ???