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

# If you're using Named virtual hosts, just remove the 'Listen' line

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

LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
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]

# Enable your front-end server to handle search engine requests

RewriteRule ^/robots\.txt - [L]

# Discard (with a '403 Forbidden') requests for the Code Red document
# (hole in IIS servers that can keep your backend mod_perl servers
# busy...)

RewriteRule ^/default\.ida - [F]

# 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>