Apache as a Proxy Server

Disclaimer...


I think proxy servers get a bad name because they have been left in the hands of folks that lack fundamental cognitive functionality. Like those folks that say "with that said" a lot.

However, a proxy server is a useful tool when you need to farm requests to different servers through one gateway. You just have to be careful with it. Don't create an open proxy and expose it to the wild... that would be bad! It will curve your spine... warp your sole... and keep the country from winning the war. Just don't do it.

CREATED 2021-02-12 08:56:35.0

010-00-05-6D

UPDATED 2021-02-12 09:08:51.0

In the Beginning...


Since Apache is a module based server and mod_proxy is a module... why it begins with mod... before you can use it, you have to enable it. Apache doesn't come out of the box with proxies enabled... for good reason.

It's pretty simple. As root... issue the command a2enmod <mod_name>. For example: to enable the basic proxy package use:

a2enmod proxy

It will enable the mod i.e. create a link in the mods-enabled directory then tell you to restart Apache. Don't... at least not yet. You also need another module depending on what you are doing. Like http to handle http requests. So enable that, then restart Apache.

CREATED 2021-02-12 09:17:08.0

010-00-05-70

UPDATED 2021-02-12 09:17:26.0

Forward Proxy...


A forward proxy allows a client to use your server to access other servers... AND... hide who they are. In other words... the client would be completely transparent to the server they are contacting.

This is the part you have to be careful with. A forward proxy has to be controlled by either

  • restricting access to it
  • OR
  • restricting where it can go

CREATED 2021-02-12 09:09:46.0

010-00-05-6E

UPDATED 2021-02-12 09:17:16.0

Reverse Proxy...


A reverse proxy... on the other hand... simply forwards requests to another server i.e. acts as a gateway. This is a great option is you want to control access or farm out odd jobs.

For example... a server that is behind a firewall... a backend server... or a server that has a specialized function like a login server.

CREATED 2021-02-12 09:14:22.0

010-00-05-6F

UPDATED 2021-02-12 09:17:18.0

Knowledge

L
I
N
K
S

DBID: db.wam

Page Server: Ithica

©2012 Leistware Data Systems

      Hello anonymous