Reverse Proxy Configuration

bacoxswain wrote on Saturday, March 14, 2015:

We are lab-testing an installation of OpenEMR for an RFQ as a potential integration project for one of our long-time clients using their pre-existing hybrid hosting infrastructure which uses an apache-based reverse proxy to reach services via the standard ProxyPass and HTMLURLMap methodologies. In our lab setup, the reverse proxy returns proper URL redirection, properly proxies tagging, and will ultimately proxy the .php content. However, it pops a 404 error when trying to proxy the /theme/ .css style sheets…

  1. Are there any special configuration requirements for implementing/installing OpenEMR behind a reverse proxy?

  2. Should we simply run OpenEMR as a web application and simply install it as another directory on the public facing apache server?

Any help here would be greatly appreciated - I like what I see and would love to help spread and recommend OpenEMR integration to other clients…

  • Thanks,
    Chris

Addressing is as follows:
Apache2 ReverseProxy Server is 10.10.1.2/16
Intranet client address is 10.10.100.15/16
OpenEMR host address is 10.10.0.69/16

The reverse proxy setup is as follows:

Order allow,deny Allow from all

<VirtualHost *:80>

    ServerAdmin webmaster@localhost
    DocumentRoot /var/www/html

    ProxyVia On
    ProxyPreserveHost On
    ProxyHTMLEnable On

    ProxyPass /demo_emr/ http://10.10.0.69/
    ProxyPassReverse /demo_emr/ http://10.10.0.69/
    ProxyHTMLURLMap http://10.10.0.69/ /demo_emr/

An excerpt from the apache debug log follows:

[Fri Mar 13 20:44:29.994788 2015] [proxy:debug] [pid 3858] proxy_util.c(2020): AH00942: HTTP: has acquired connection for (10.10.0.69)

[Fri Mar 13 20:44:29.994799 2015] [proxy:debug] [pid 3858] proxy_util.c(2072): [client 10.10.100.15:63303] AH00944: connecting http://10.10.0.69/openemr/ to 10.10.0.69:80

[Fri Mar 13 20:44:29.995010 2015] [proxy:debug] [pid 3858] proxy_util.c(2206): [client 10.10.100.15:63303] AH00947: connected /openemr/ to 10.10.0.69:80

[Fri Mar 13 20:44:29.995509 2015] [proxy:debug] [pid 3858] proxy_util.c(2610): AH00962: HTTP: connection complete to 10.10.0.69:80 (10.10.0.69)

[Fri Mar 13 20:44:30.001789 2015] [proxy:debug] [pid 3858] proxy_util.c(2035): AH00943: http: has released connection for (10.10.0.69)

[Fri Mar 13 20:44:30.001875 2015] [xml2enc:debug] [pid 3858] mod_xml2enc.c(178): [client 10.10.100.15:63303] AH01430: Content-Type is text/html

[Fri Mar 13 20:44:30.001955 2015] [xml2enc:debug] [pid 3858] mod_xml2enc.c(254): [client 10.10.100.15:63303] AH01434: Charset ISO-8859-1 not supported by libxml2; trying apr_xlate

[Fri Mar 13 20:44:30.007665 2015] [authz_core:debug] [pid 3857] mod_authz_core.c(828): [client 10.10.100.15:63304] AH01628: authorization result: granted (no directives)

[Fri Mar 13 20:44:30.008097 2015] [proxy:debug] [pid 3857] mod_proxy.c(1104): [client 10.10.100.15:63304] AH01143: Running scheme http handler (attempt 0)

[Fri Mar 13 20:44:30.008180 2015] [proxy:debug] [pid 3857] proxy_util.c(2020): AH00942: HTTP: has acquired connection for (10.10.0.69)

[Fri Mar 13 20:44:30.008216 2015] [proxy:debug] [pid 3857] proxy_util.c(2072): [client 10.10.100.15:63304] AH00944: connecting http://10.10.0.69/openemr/interface/login/login_frame.php?site=default to 10.10.0.69:80

[Fri Mar 13 20:44:30.008518 2015] [proxy:debug] [pid 3857] proxy_util.c(2206): [client 10.10.100.15:63304] AH00947: connected /openemr/interface/login/login_frame.php?site=default to 10.10.0.69:80

[Fri Mar 13 20:44:30.008795 2015] [proxy:debug] [pid 3857] proxy_util.c(2610): AH00962: HTTP: connection complete to 10.10.0.69:80 (10.10.0.69)

[Fri Mar 13 20:44:30.019762 2015] [proxy:debug] [pid 3857] proxy_util.c(2035): AH00943: http: has released connection for (10.10.0.69)

[Fri Mar 13 20:44:30.019799 2015] [xml2enc:debug] [pid 3857] mod_xml2enc.c(178): [client 10.10.100.15:63304] AH01430: Content-Type is text/html; charset=utf-8

[Fri Mar 13 20:44:30.019828 2015] [xml2enc:info] [pid 3857] [client 10.10.100.15:63304] AH01431: Got charset utf-8 from HTTP headers

[Fri Mar 13 20:44:30.024609 2015] [authz_core:debug] [pid 3858] mod_authz_core.c(802): [client 10.10.100.15:63303] AH01626: authorization result of Require all granted: granted, referer: http://10.10.1.2/demo_emr/openemr/interface/login/login_frame.php?site=default

[Fri Mar 13 20:44:30.024653 2015] [authz_core:debug] [pid 3858] mod_authz_core.c(802): [client 10.10.100.15:63303] AH01626: authorization result of : granted, referer: http://10.10.1.2/demo_emr/openemr/interface/login/login_frame.php?site=default

[Fri Mar 13 20:44:30.024826 2015] [core:info] [pid 3858] [client 10.10.100.15:63303] AH00128: File does not exist: /var/www/html/openemr/interface/themes/style_metal.css, referer: http://10.10.1.2/demo_emr/openemr/interface/login/login_frame.php?site=default

[Fri Mar 13 20:44:30.025035 2015] [authz_core:debug] [pid 3857] mod_authz_core.c(828): [client 10.10.100.15:63304] AH01628: authorization result: granted (no directives), referer: http://10.10.1.2/demo_emr/openemr/interface/login/login_frame.php?site=default

[Fri Mar 13 20:44:30.025065 2015] [proxy:debug] [pid 3857] mod_proxy.c(1104): [client 10.10.100.15:63304] AH01143: Running scheme http handler (attempt 0), referer: http://10.10.1.2/demo_emr/openemr/interface/login/login_frame.php?site=default

[Fri Mar 13 20:44:30.025075 2015] [proxy:debug] [pid 3857] proxy_util.c(2020): AH00942: HTTP: has acquired connection for (10.10.0.69)

[Fri Mar 13 20:44:30.025081 2015] [proxy:debug] [pid 3857] proxy_util.c(2072): [client 10.10.100.15:63304] AH00944: connecting http://10.10.0.69/openemr/interface/themes/login.css to 10.10.0.69:80, referer: http://10.10.1.2/demo_emr/openemr/interface/login/login_frame.php?site=default

[Fri Mar 13 20:44:30.025088 2015] [proxy:debug] [pid 3857] proxy_util.c(2206): [client 10.10.100.15:63304] AH00947: connected /openemr/interface/themes/login.css to 10.10.0.69:80, referer: http://10.10.1.2/demo_emr/openemr/interface/login/login_frame.php?site=default

[Fri Mar 13 20:44:30.025897 2015] [proxy:debug] [pid 3857] proxy_util.c(2035): AH00943: http: has released connection for (10.10.0.69)

[Fri Mar 13 20:44:30.025908 2015] [xml2enc:debug] [pid 3857] mod_xml2enc.c(178): [client 10.10.100.15:63304] AH01430: Content-Type is text/css, referer: http://10.10.1.2/demo_emr/openemr/interface/login/login_frame.php?site=default

[Fri Mar 13 20:44:30.025916 2015] [xml2enc:debug] [pid 3857] mod_xml2enc.c(254): [client 10.10.100.15:63304] AH01434: Charset ISO-8859-1 not supported by libxml2; trying apr_xlate, referer: http://10.10.1.2/demo_emr/openemr/interface/login/login_frame.php?site=default

[Fri Mar 13 20:44:30.028251 2015] [xml2enc:debug] [pid 3857] mod_xml2enc.c(452): [client 10.10.100.15:63304] AH01439: xml2enc: consuming 1848 bytes from bucket, referer: http://10.10.1.2/demo_emr/openemr/interface/login/login_frame.php?site=default

[Fri Mar 13 20:44:30.028366 2015] [xml2enc:debug] [pid 3857] mod_xml2enc.c(479): [client 10.10.100.15:63304] AH01441: xml2enc: converted 1239/1847 bytes, referer: http://10.10.1.2/demo_emr/openemr/interface/login/login_frame.php?site=default

[Fri Mar 13 20:44:30.028384 2015] [xml2enc:debug] [pid 3857] mod_xml2enc.c(479): [client 10.10.100.15:63304] AH01441: xml2enc: converted 609/939 bytes, referer: http://10.10.1.2/demo_emr/openemr/interface/login/login_frame.php?site=default

[Fri Mar 13 20:44:30.034953 2015] [authz_core:debug] [pid 3858] mod_authz_core.c(802): [client 10.10.100.15:63303] AH01626: authorization result of Require all granted: granted, referer: http://10.10.1.2/demo_emr/openemr/interface/login/login_frame.php?site=default

[Fri Mar 13 20:44:30.034964 2015] [authz_core:debug] [pid 3858] mod_authz_core.c(802): [client 10.10.100.15:63303] AH01626: authorization result of : granted, referer: http://10.10.1.2/demo_emr/openemr/interface/login/login_frame.php?site=default

[Fri Mar 13 20:44:30.034980 2015] [core:info] [pid 3858] [client 10.10.100.15:63303] AH00128: File does not exist: /var/www/html/openemr/interface/login/filler.php, referer: http://10.10.1.2/demo_emr/openemr/interface/login/login_frame.php?site=default

[Fri Mar 13 20:44:30.036257 2015] [authz_core:debug] [pid 3858] mod_authz_core.c(802): [client 10.10.100.15:63303] AH01626: authorization result of Require all granted: granted, referer: http://10.10.1.2/demo_emr/openemr/interface/login/login_frame.php?site=default

[Fri Mar 13 20:44:30.036267 2015] [authz_core:debug] [pid 3858] mod_authz_core.c(802): [client 10.10.100.15:63303] AH01626: authorization result of : granted, referer: http://10.10.1.2/demo_emr/openemr/interface/login/login_frame.php?site=default

[Fri Mar 13 20:44:30.036280 2015] [core:info] [pid 3858] [client 10.10.100.15:63303] AH00128: File does not exist: /var/www/html/openemr/interface/login/login_title.php, referer: http://10.10.1.2/demo_emr/openemr/interface/login/login_frame.php?site=default

[Fri Mar 13 20:44:30.037568 2015] [authz_core:debug] [pid 3858] mod_authz_core.c(802): [client 10.10.100.15:63303] AH01626: authorization result of Require all granted: granted, referer: http://10.10.1.2/demo_emr/openemr/interface/login/login_frame.php?site=default

[Fri Mar 13 20:44:30.037578 2015] [authz_core:debug] [pid 3858] mod_authz_core.c(802): [client 10.10.100.15:63303] AH01626: authorization result of : granted, referer: http://10.10.1.2/demo_emr/openemr/interface/login/login_frame.php?site=default

[Fri Mar 13 20:44:30.037591 2015] [core:info] [pid 3858] [client 10.10.100.15:63303] AH00128: File does not exist: /var/www/html/openemr/interface/login/login.php, referer: http://10.10.1.2/demo_emr/openemr/interface/login/login_frame.php?site=default