# Apache won't be able to resolve its own hostname, so we sneak this
# into the global context to silence a confusing-to-user warning on
# server start.
ServerName hg
ServerName hgweb
ErrorLog ${APACHE_LOG_DIR}/error.log
LogLevel warn
CustomLog ${APACHE_LOG_DIR}/access.log combined
# These headers need to be set or else Anubis will
# throw an "admin misconfiguration" error.
RequestHeader set "X-Real-Ip" "expr=%{REMOTE_ADDR}"
RequestHeader set "X-Forwarded-Proto" "expr=%{REQUEST_SCHEME}"
RequestHeader set "X-Http-Version" "%{SERVER_PROTOCOL}s"
ProxyPreserveHost On
# Anubis is listening on this address.
ProxyPass / http://[::1]:8923/
ProxyPassReverse / http://[::1]:8923/
# Sneak this directive into the global context.
Listen [::1]:3001
ServerName hgweb
ErrorLog ${APACHE_LOG_DIR}/error.log
LogLevel warn
CustomLog ${APACHE_LOG_DIR}/access.log combined
WSGIDaemonProcess hg processes=${WSGI_PROCESSES} threads=${WSGI_THREADS} maximum-requests=${WSGI_MAX_REQUESTS} user=www-data group=www-data display-name=hg-wsgi
WSGIProcessGroup hg
WSGIScriptAlias / /var/hg/htdocs/hgweb.wsgi
Require all granted
Alias /static/ /var/hg/install/lib/python3.13/site-packages/mercurial/templates/static/
Options -Indexes
Require all granted
Redirect 301 /favicon.ico /static/hgicon.png