MoonPoint Support Logo


Shop Amazon Warehouse Deals - Deep Discounts on Open-box and Used ProductsAmazon Warehouse Deals

Advanced Search
Sun Mon Tue Wed Thu Fri Sat

Wed, Aug 06, 2008 11:09 pm

Configuring Apache as a Proxy Server

I needed to configure an Apache (version 2.0.59) server to act as a proxy server. I also needed it to continue to act as a web server. To do so, I added the 3 LoadModule directives shown below to the LoadModule section of Apache's httpd.conf, which is located in /usr/local/apache2/conf on this particular system, which is a Solaris 2.7 server (it will likely be in /etc/httpd/conf/httpd.conf, if you are running Apache on a Linux system).
# Dynamic Shared Object (DSO) Support
# To be able to use the functionality of a module which was built as a DSO you
# have to place corresponding `LoadModule' lines at this location so the
# directives contained in it are actually available _before_ they are used.
# Statically compiled modules (those listed by `httpd -l') do not need
# to be loaded here.
# Example:
# LoadModule foo_module modules/
LoadModule proxy_module modules/
LoadModule proxy_connect_module modules/
LoadModule proxy_http_module modules/
The following lines, except for the comment lines, are also needed in httpd.conf:

# Proxy Server directives. Uncomment the following lines to
# enable the proxy server:

ProxyRequests On

    Order deny,allow
    Deny from all
    Allow from
In this case I wanted to limit access to the proxy server to access from the system itself, e.g. from the loopback address,, and two other IP addresses, and I could have also used 192.168.1 to allow access from any 192.168.1.x address.

After modifying the httpd.conf file, I restarted Apache with /usr/local/apache2/bin/apachectl restart. For a Linux system apachectl restart should suffice, though it is likely located in /usr/sbin, if you need to specify the full path.

After restarting Apache I was able to configure a browser on the system at the address to use the Apache server as a proxy server. I used the IP address of the Apache server, as the HTTP proxy server address with 80 as the port. I verified that the browser was using the Apache server as a proxy server by pointing the browser on the system to That site showed the address for the system as, i.e. it showed the connection as originating from the proxy server rather than the actual system on which the browser was being used.

I was also still able to access webpages on the website I host on the Apache server on the default HTTP port.

If you want to turn the proxy service off, you need only change the ProxyRequests On line to ProxyRequests Off and restart Apache.


  1. Configuring Apache 2.0 as a Forward Proxy Server
    By: Martin Brown
    Date: January 4, 2008
  2. Configuring mod_proxy support for Apache
  3. [/network/web/server/apache] permanent link

Once You Know, You Newegg AliExpress by

Shop Amazon Local - Subscribe to Deals in Your Neighborhood

Valid HTML 4.01 Transitional

Privacy Policy   Contact

Blosxom logo