Sample httpd_static.conf File


# Change manually:
#   -- Change '127.0.0.1' to your IP address
#   -- Change 'webmaster@mycompany.com' to your contact e-mail address
#   -- Change 'www.mycompany.com' to your website hostname

Listen 127.0.0.1:80
<VirtualHost 127.0.0.1:80>
Port 80

ServerAdmin webmaster@mycompany.com
ServerName www.mycompany.com
DocumentRoot %%WEBSITE_DIR%%/html

CustomLog %%WEBSITE_DIR%%/logs/access_log_static combined
ErrorLog  %%WEBSITE_DIR%%/logs/error_log_static

#
# Proxy server setup
#

# Tell mod_rewrite to start working for this VirtualHost

RewriteEngine On

# any URL beginning with /images will be answered by this server and
# no further mod_rewrite rules will be processed

RewriteRule ^/images - [L]

# Proxy ([P]) all other requests to a back-end server

RewriteRule ^/(.*) http://127.0.0.1:8080/$1 [P]

# Ensure that the locations coming back from the back-end server
# through this proxy to the client are correct; otherwise, users would
# see things like:
#
#  http://www.mysite.com:8080/User/listing/
#
# in their location, which messes up *everything*.

ProxyPassReverse / http://127.0.0.1/

# This last line ensures that bad people don't try to use your proxy
# server to get other content from around the web

RewriteRule ^proxy:.* - [F]

</VirtualHost>