Home > apache, Open Source, Web > Apache ProxyPass to the rescue for firewalled ports

Apache ProxyPass to the rescue for firewalled ports

September 24, 2014 Leave a comment Go to comments

When trying to make a web-utility I look after with its own TomCat server available to the public web from a server with only http and https ports accessible through our firewall I stumbled on Apache’s ability to proxy pages internally. This lets me give public access to a web server running on a port that is not open to the public by getting Apache to pass the content back through the publicly available port 443.

This is how it works:

ProxyPass /foo https://privateserver.company.com
ProxyPassReverse /foo https://privateserver.company.com

Will mean going to https://publicserver.company.com/foo will show that URL but actually show content from https://privateserver.company.com.

Or in my case:

ProxyPass / https://privateserver.company.com:1443
ProxyPassReverse / https://privateserver.company.com:1443

Will mean going to https://publicserver.company.com/ actually shows content from the web server on the same server running on port 1443. Very handy!

Categories: apache, Open Source, Web
  1. September 24, 2014 at 4:37 am

    See Apache documentation at http://httpd.apache.org/docs/current/mod/mod_proxy.html for more info.

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: