Posts Tagged ‘ Apache Server ’

Reverse Proxy a request, with Apache server for a spring boot application

  1. Uncomment the below module in httpd.conf:

LoadModule proxy_http_module modules/mod_proxy_http.so

  1. Sample proxy configuration in httpd.conf:

Listen 9030
SSLProxyEngine On

SSLProxyVerify none 
SSLProxyCheckPeerCN off
SSLProxyCheckPeerName off
SSLProxyCheckPeerExpire off

RequestHeader set Front-End-Https "On"

#NameVirtualHost *
<VirtualHost localhost:9030>
<Proxy https://localhost:7147/*>
Allow from all
</Proxy>
<LocationMatch "/test-rest">
ProxyPass http://localhost:7147/test-rest
ProxyPassReverse http://localhost:7147/test-rest
Header add REMOTE_VALUE "2"
RequestHeader set REMOTE_VALUE "2"
</LocationMatch>
</VirtualHost>

Project used:
simple-rest-which-accepts-header