# This is an example VirtualHosts configuration. # # Since Apache 1.3.19, we modified the setup to include some nice tricks: # # - We added the User and Group directives so VirtualHosts now work with # suexec directive. If set, Apache will run all cgi scripts under that # user and group (provided the uid and gid are > 100 for security). The # directories and cgi files *must* belong to that user/group for the # feature to work # # - We added the Setenv VLOG directive. This works in conjunction with # the CustomLog in common.conf. When Setenv VLOG is set, apache will # create a /var/log/httpd/VLOG-YYYY-MM-.log instead of logging # to access_log. Use this instead of defining a special logfile for # each vhost, otherwise you eat up file descriptors. # # - You can also specify a path for the VLOG for each Vhost, for example, # to place the logs in each user's directory. However, if you want to # use the file for accounting, place it in a directory owned by root, # otherwise the user will be able to erase it. # # - I suggest only including the ErrorLog *only* if the vhost will use # cgi scripts. Again, it saves file descriptors! ################# IP-based Virtual Hosts # # User jmdault # Group jmdault # DocumentRoot /home/jmdault/public_html # ServerName test2.com # Setenv VLOG /home/jmdault/logs # ErrorLogs /home/jmdault/test2-error_log # ################# Named VirtualHosts NameVirtualHost yourhost.com ServerName yourhost.com DocumentRoot /usr/local/perseus/docroot RewriteEngine On RewriteOptions Inherit RewriteLog "/var/log/httpd/rewrite.log" RewriteLogLevel 3 #### hopper home rewrite rules #### RewriteRule ^/hopper$ http://yourhost.com/hopper/ [R] RewriteRule ^/hopper/home$ http://yourhost.com/hopper/ [P,L] RewriteRule ^/hopper/home/$ http://yourhost.com/hopper/ [P,L] #### all other hopper pages rewrite rules #### RewriteRule ^/hopper/opensource/downloads/(.*) http://www.perseus.tufts.edu/hopper/opensource/downloads/$1 [P,L] RewriteRule ^/hopper/(.*) http://yourhost.com:8080/hopper/$1 [P,L] Order deny,allow Allow from all ProxyRequests On ProxyPass /hopper http://yourhost.com:8080/hopper ProxyPassReverse /hopper http://yourhost.com:8080/hopper