| Author | 
  | 
Shaggy1
 
 
  Joined: 30 Jul 2020 Posts: 11
 
  | 
 Posted: Wed 26 Aug '20 11:05    Post subject: How do I get mod_proxy_html.so for apache on centos 7 ? | 
     | 
 
  | 
 
Hi
 
 
System info:
 
$ cat /etc/*-release
 
 	  | Code: | 	 		  CentOS Linux release 7.6.1810 (Core)
 
NAME="CentOS Linux"
 
VERSION="7 (Core)"
 
ID="centos"
 
ID_LIKE="rhel fedora"
 
VERSION_ID="7"
 
PRETTY_NAME="CentOS Linux 7 (Core)"
 
ANSI_COLOR="0;31"
 
CPE_NAME="cpe:/o:centos:centos:7"
 
HOME_URL="https://www.centos.org/"
 
BUG_REPORT_URL="https://bugs.centos.org/"
 
 
CENTOS_MANTISBT_PROJECT="CentOS-7"
 
CENTOS_MANTISBT_PROJECT_VERSION="7"
 
REDHAT_SUPPORT_PRODUCT="centos"
 
REDHAT_SUPPORT_PRODUCT_VERSION="7"
 
 
CentOS Linux release 7.6.1810 (Core)
 
CentOS Linux release 7.6.1810 (Core) | 	  
 
 
 
$ uname -a
 
 	  | Code: | 	 		  | Linux lb-cbga-eq 3.10.0-1062.1.1.el7.x86_64 #1 SMP Fri Sep 13 22:55:44 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux | 	  
 
 
---------------------------------------------
 
 
I have a centos 6 machine that runs a locally built version of httpd 2.4.25 as a reverse proxy. To do this I have set up virtual hosts and use the ProxyHTMLURLMap directive which seems to work fine.
 
 
I am now trying to do a similar thing using the out of the box httpd 2.4.6 on a centos 7 machine. When I try to use a similar configuration I get an error:
 
 	  | Code: | 	 		  | Invalid command 'ProxyHTMLURLMap', perhaps misspelled or defined by a module not included in the server configuration | 	  
 
 
I think this is because mod_proxy_html.so is required for this - is that correct ?
 
 
When I try to load the module using the LoadModule directive I get the following error:
 
 	  | Code: | 	 		  | httpd: Syntax error on line 127 of /etc/httpd/conf/httpd.conf: Cannot load modules/mod_proxy_html.so into server: /etc/httpd/modules/mod_proxy_html.so: cannot open shared object file: No such file or directory | 	  
 
 
And indeed I cannot see the mod_proxy_html.so in the modules directory.
 
 
Does anyone know how I can install a mod_proxy_html.so for an out of the box httpd on centos 7?
 
 
Or is the only way to do this to build it from source (as I have done on my centos 6 box) ?
 
 
Edit:
 
I did try to install using the following command:
 
$ yum install mod_proxy_html
 
 
and got the following error:
 
 	  | Code: | 	 		  No package mod_proxy_html available.
 
Error: Nothing to do | 	 
  | 
 
  | 
| Back to top | 
 | 
James Blond Moderator
  
  Joined: 19 Jan 2006 Posts: 7442 Location: EU, Germany, Next to Hamburg
  | 
 | 
| Back to top | 
 | 
Shaggy1
 
 
  Joined: 30 Jul 2020 Posts: 11
 
  | 
 Posted: Thu 27 Aug '20 17:17    Post subject:  | 
     | 
 
  | 
 
Thank you for the reply.
 
 
I downloaded that one, but got the following errors:
 
 	  | Code: | 	 		  # rpm -i mod_proxy_html-2.4.6-93.el7.centos.aarch64.rpm
 
warning: mod_proxy_html-2.4.6-93.el7.centos.aarch64.rpm: Header V3 RSA/SHA256 Signature, key ID 305d49d6: NOKEY
 
error: Failed dependencies:
 
        httpd = 0:2.4.6-93.el7.centos is needed by mod_proxy_html-1:2.4.6-93.el7.centos.aarch64
 
        httpd-mmn = 20120211aarch64 is needed by mod_proxy_html-1:2.4.6-93.el7.centos.aarch64
 
        ld-linux-aarch64.so.1()(64bit) is needed by mod_proxy_html-1:2.4.6-93.el7.centos.aarch64
 
        ld-linux-aarch64.so.1(GLIBC_2.17)(64bit) is needed by mod_proxy_html-1:2.4.6-93.el7.centos.aarch64 | 	  
 
 
However searching specifically for such individual rpm files I found this:
 
 	  | Code: | 	 		  | http://lxsoft102.cern.ch/cern/centos/7.6.1810/sclo/x86_64/rh/Packages/h/httpd24-mod_proxy_html-2.4.34-18.el7.x86_64.rpm | 	  
 
 
Using rpm to install it does not complain:
 
 	  | Code: | 	 		  | rpm -i httpd24-mod_proxy_html-2.4.34-18.el7.x86_64.rpm | 	  
 
 
But there is still not any modules/mod_proxy_html.so. Do I need to do something to generate it ? | 
 
  | 
| Back to top | 
 | 
James Blond Moderator
  
  Joined: 19 Jan 2006 Posts: 7442 Location: EU, Germany, Next to Hamburg
  | 
 Posted: Fri 28 Aug '20 8:44    Post subject:  | 
     | 
 
  | 
 
I don't have CentOS But you need to load the module like
 
 
 	  | Code: | 	 		  LoadModule proxy_module /usr/lib64/httpd/modules/mod_proxy.so
 
LoadModule proxy_html_module /usr/lib64/httpd/modules/mod_proxy_html.so
 
 | 	  
 
 
is there are in proxy-html.conf /etc/httpd/conf.d/ ? | 
 
  | 
| Back to top | 
 | 
Shaggy1
 
 
  Joined: 30 Jul 2020 Posts: 11
 
  | 
 Posted: Fri 28 Aug '20 10:14    Post subject:  | 
     | 
 
  | 
 
The problem is there is no mod_proxy_html.so module in /usr/lib64/httpd/modules:
 
 	  | Code: | 	 		  $ ls /usr/lib64/httpd/modules/mod_proxy_html.so
 
ls: cannot access /usr/lib64/httpd/modules/mod_proxy_html.so: No such file or directory | 	  
 
 
> is there are in proxy-html.conf /etc/httpd/conf.d/ ?
 
No there wasn't
 
I copied /usr/share/doc/httpd-2.4.6/proxy-html.conf to conf.d and uninstalled and re-installed the rpm. However mod_proxy_html.so still does not exist.
 
 
Do I need to edit /proxy-html.conf ? | 
 
  | 
| Back to top | 
 | 
James Blond Moderator
  
  Joined: 19 Jan 2006 Posts: 7442 Location: EU, Germany, Next to Hamburg
  | 
 Posted: Fri 28 Aug '20 15:16    Post subject:  | 
     | 
 
  | 
 
That file needs at least
 
 
 	  | Code: | 	 		  
 
ProxyHTMLLinks   a      href
 
ProxyHTMLLinks   area      href
 
ProxyHTMLLinks   link      href
 
ProxyHTMLLinks   img      src longdesc usemap
 
ProxyHTMLLinks   object      classid codebase data usemap
 
ProxyHTMLLinks   q      cite
 
ProxyHTMLLinks   blockquote   cite
 
ProxyHTMLLinks   ins      cite
 
ProxyHTMLLinks   del      cite
 
ProxyHTMLLinks   form      action
 
ProxyHTMLLinks   input      src usemap
 
ProxyHTMLLinks   head      profile
 
ProxyHTMLLinks   base      href
 
ProxyHTMLLinks   script      src for
 
 
# To support scripting events (with ProxyHTMLExtended On),
 
# you'll need to declare them too.
 
 
ProxyHTMLEvents   onclick ondblclick onmousedown onmouseup \
 
      onmouseover onmousemove onmouseout onkeypress \
 
      onkeydown onkeyup onfocus onblur onload \
 
      onunload onsubmit onreset onselect onchange
 
 | 	 
  | 
 
  | 
| Back to top | 
 | 
Shaggy1
 
 
  Joined: 30 Jul 2020 Posts: 11
 
  | 
 Posted: Fri 04 Sep '20 14:04    Post subject:  | 
     | 
 
  | 
 
Looks like my proxy-html.conf does include that list.
 
 
Whatever I do it seems I am unable to get the standard mod_proxy_html - not even sure what command should get it - when I install the rpm ?
 
 
I have got httpd running with mod_proxy_html by building apr/apr-util/httpd from source. Not sure it is possible to do using the delivered httpd. | 
 
  | 
| Back to top | 
 | 
James Blond Moderator
  
  Joined: 19 Jan 2006 Posts: 7442 Location: EU, Germany, Next to Hamburg
  | 
 | 
| Back to top | 
 |