Source

hgbook / web / hgbook.conf

# -*- apache -*-

<VirtualHost *:80>
    ServerName hgbook.red-bean.com
    ServerAdmin bos@serpentine.com
    ErrorLog logs/hgbook-error_log
    # Debian:
    # CustomLog logs/hgbook-access_log full
    # Fedora:
    CustomLog logs/hgbook-access_log combined
    Options +MultiViews
    DirectoryIndex index.html.var index.html
    DocumentRoot "/home/bos/hg/hgbook/en/html"

    Redirect permanent /hgbook.html /index.html
    Redirect permanent /hgbookch1.html /read/preface.html
    Redirect permanent /hgbookch2.html /read/a-tour-of-mercurial-the-basics.html
    Redirect permanent /hgbookch3.html /read/a-tour-of-mercurial-merging-work.html
    Redirect permanent /hgbookch4.html /read/behind-the-scenes.html
    Redirect permanent /hgbookch5.html /read/mercurial-in-daily-use.html
    Redirect permanent /hgbookch6.html /read/file-names-and-pattern-matching.html
    Redirect permanent /hgbookch6.html /read/managing-releases-and-branchy-development.html
    Redirect permanent /hgbookch7.html /read/finding-and-fixing-mistakes.html
    Redirect permanent /hgbookch8.html /read/handling-repository-events-with-hooks.html
    Redirect permanent /hgbookch9.html /read/customizing-the-output-of-mercurial.html
    Redirect permanent /hgbookch10.html /read/managing-change-with-mercurial-queues.html
    Redirect permanent /hgbookch11.html /read/advanced-uses-of-mercurial-queues.html
    Redirect permanent /hgbookch12.html /read/adding-functionality-with-extensions.html
    Redirect permanent /hgbookap1.html /read/command-reference.html
    Redirect permanent /hgbookap2.html /read/mercurial-queues-reference.html
    Redirect permanent /hgbookap3.html /read/installing-mercurial-from-source.html
    Redirect permanent /hgbookap4.html /read/open-publication-license.html
    Redirect permanent /hgbookli1.html /read/index.html
    Redirect permanent /hgbookli2.html /read/index.html
    Redirect permanent /hgbookli3.html /read/index.html
    Redirect permanent /hgbookli4.html /read/index.html

    # Actively redirect requests via a ServerAlias to the canonical hostname.
    RewriteEngine On
    RewriteCond %{HTTP_HOST} !=hgbook.red-bean.com
    RewriteRule ^(.*) http://hgbook.red-bean.com$1 [R]

    <Location "/">
        SetHandler python-program
	# hg clone http://bitbucket.org/mirror/django-trunk/
        PythonPath "['/home/bos/hg/django-trunk', '/home/bos/hg/hgbook/web'] + sys.path"
        PythonHandler django.core.handlers.modpython
        PythonAutoReload Off
        SetEnv DJANGO_SETTINGS_MODULE hgbook.settings
        PythonDebug Off
    </Location>

    <Location ~ "^/$">
        SetHandler None
        DirectoryIndex index.html
    </Location>

    <Location ~ "^/index.html">
        SetHandler None
    </Location>

    <Location ~ "^/robots.txt">
        SetHandler None
    </Location>

    <Location "/read">
        SetHandler None
    </Location>

    <Location "/support">
        SetHandler None
    </Location>

    <Location "/media">
        SetHandler None
    </Location>

    Alias /media /home/bos/hg/django-trunk/django/contrib/admin/media

    <Directory "/home/bos/hg/hgbook/en/html">
        Options Indexes FollowSymlinks
        AllowOverride None
        Order allow,deny
        Allow from all
    </Directory>

    <Directory "/home/bos/hg/hgbook/en/html">
        AllowOverride AuthConfig
    </Directory>

    <Directory "/home/bos/hg/hgbook/en/html/support">
        Options None
    </Directory>
</VirtualHost>

<Directory "/home/bos/hg/django-trunk/django/contrib/admin/media">
    Options None
    AllowOverride None
    Order allow,deny
    Allow from all
</Directory>
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.