public

Mac OS X Snow Leopard - /private/etc/apache2/extra/httpd-vhosts.conf

  • Download Gist
private_etc_apache2_extra_httpd-vhosts.conf
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95
#
# Virtual Hosts
#
# If you want to maintain multiple domains/hostnames on your
# machine you can setup VirtualHost containers for them. Most configurations
# use only name-based virtual hosts so the server doesn't need to worry about
# IP addresses. This is indicated by the asterisks in the directives below.
#
# Please see the documentation at
# <URL:http://httpd.apache.org/docs/2.2/vhosts/>
# for further details before you try to setup virtual hosts.
#
# You may use the command line option '-S' to verify your virtual host
# configuration.
 
#
# Use name-based virtual hosting.
#
NameVirtualHost *:80
 
<VirtualHost *:80>
ServerName mini.cdwilson.us
ServerAlias www.mini.cdwilson.us
ServerAlias home.cdwilson.us
ServerAlias www.home.cdwilson.us
ErrorLog "/private/var/log/apache2/mini.cdwilson.us-error_log"
CustomLog "/private/var/log/apache2/mini.cdwilson.us-access_log" common
</VirtualHost>
 
<VirtualHost *:80>
ServerName git.cdwilson.us
ServerAlias www.git.cdwilson.us
ErrorLog "/private/var/log/apache2/git.cdwilson.us-error_log"
CustomLog "/private/var/log/apache2/git.cdwilson.us-access_log" common
SetEnv GITWEB_CONFIG /etc/gitweb.conf
<IFModule rewrite_module>
#
# turning on mod rewrite
RewriteEngine on
# make the front page an internal rewrite to the gitweb script
RewriteRule ^/$ /cgi-bin/gitweb.cgi [L,PT]
# make access for "dumb clients" work
RewriteRule ^/(.*\.git/(?!/?(HEAD|info|objects|refs)).*)?$ /cgi-bin/gitweb.cgi%{REQUEST_URI} [L,PT]
</IFModule>
<IfModule alias_module>
#
# Redirect: Allows you to tell clients about documents that used to
# exist in your server's namespace, but do not anymore. The client
# will make a new request for the document at its new location.
# Example:
# Redirect permanent /foo http://www.example.com/bar
#
# Alias: Maps web paths into filesystem paths and is used to
# access content that does not live under the DocumentRoot.
# Example:
# Alias /webpath /full/filesystem/path
#
# If you include a trailing / on /webpath then the server will
# require it to be present in the URL. You will also likely
# need to provide a <Directory> section to allow access to
# the filesystem path.
Alias /gitweb.css /opt/local/share/git-core/gitweb/gitweb.css
Alias /git-logo.png /opt/local/share/git-core/gitweb/git-logo.png
Alias /git-favicon.png /opt/local/share/git-core/gitweb/git-favicon.png
Alias /gitweb.js /opt/local/share/git-core/gitweb/gitweb.js
#
# ScriptAlias: This controls which directories contain server scripts.
# ScriptAliases are essentially the same as Aliases, except that
# documents in the target directory are treated as applications and
# run by the server when requested rather than as documents sent to the
# client. The same rules about trailing "/" apply to ScriptAlias
# directives as to Alias.
#
ScriptAliasMatch ^/cgi-bin/((?!(?i:webobjects)).*$) "/opt/local/share/git-core/gitweb/$1"
</IfModule>
<Directory "/opt/local/share/git-core/gitweb">
AllowOverride None
Options None
Order allow,deny
Allow from all
</Directory>
</VirtualHost>

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.