20100319 making app connections with mod_proxy - plembo/onemoretech GitHub Wiki

title: Making app connections with mod_proxy link: https://onemoretech.wordpress.com/2010/03/19/making-app-connections-with-mod_proxy/ author: lembobro description: post_id: 174 created: 2010/03/19 17:41:30 created_gmt: 2010/03/19 17:41:30 comment_status: open post_name: making-app-connections-with-mod_proxy status: publish post_type: post

Making app connections with mod_proxy

Apache’s mod_proxy has many uses. By far the most common is to provide an extra layer of security for application servers by acting as the gatekeeper for client connections. Another would be enhancing performance in conjunction with mod_cache.

In the simple example below I’ve set up a named virtual host to proxy connections coming in on port 80 to a different port on another server. This could be a web server or an application server, depending on the need. In this example I’m also doing a reverse proxy, which means that all communications between the client and end point server go through the same Apache instance.

`

<VirtualHost *:80>
DocumentRoot /var/www/html/www2
ServerName www2.example.com
ServerAdmin [email protected]
ErrorLog /var/log/httpd/www2_error_log
CustomLog /var/log/httpd/www2_access_log common
ProxyRequests Off
ProxyPass /newapp http://server2.example.com:15001/newapp
ProxyPassReverse /newapp http://server2.example.com:15001/newapp
</VirtualHost>

`

Copyright 2004-2019 Phil Lembo