55 lines
1.7 KiB
Text
55 lines
1.7 KiB
Text
NameVirtualHost *:80
|
|
|
|
<VirtualHost *:80>
|
|
ErrorLog ${APACHE_LOG_DIR}/error.log
|
|
CustomLog ${APACHE_LOG_DIR}/access.log combined
|
|
|
|
ServerName git.crypto-libertarian.com
|
|
|
|
Redirect permanent / https://git.crypto-libertarian.com/
|
|
</VirtualHost>
|
|
|
|
<VirtualHost _default_:443>
|
|
ErrorLog ${APACHE_LOG_DIR}/error.log
|
|
CustomLog ${APACHE_LOG_DIR}/access.log combined
|
|
|
|
ServerName git.crypto-libertarian.com
|
|
|
|
RewriteEngine on
|
|
SSLEngine on
|
|
|
|
SSLCertificateFile /etc/letsencrypt/live/git.crypto-libertarian.com/cert.pem
|
|
SSLCertificateKeyFile /etc/letsencrypt/live/git.crypto-libertarian.com/privkey.pem
|
|
SSLCertificateChainFile /etc/letsencrypt/live/git.crypto-libertarian.com/chain.pem
|
|
|
|
SetEnv GIT_PROJECT_ROOT /home/git
|
|
SetEnv GIT_HTTP_EXPORT_ALL
|
|
|
|
Alias /cgit.css /usr/share/cgit/cgit.css
|
|
Alias /cgit.png /usr/share/cgit/cgit.png
|
|
Alias /favicon.ico /usr/share/cgit/favicon.ico
|
|
Alias /robots.txt /usr/share/cgit/robots.txt
|
|
|
|
ScriptAliasMatch \
|
|
"(?x)^/(.*/(HEAD | \
|
|
info/refs | \
|
|
objects/(info/[^/]+ | \
|
|
[0-9a-f]{2}/[0-9a-f]{38} | \
|
|
pack/pack-[0-9a-f]{40}\.(pack|idx)) | \
|
|
git-(upload|receive)-pack))$" \
|
|
/usr/lib/git-core/git-http-backend/$1
|
|
|
|
ScriptAlias / /usr/lib/cgit/cgit.cgi/
|
|
|
|
<Directory "/usr/lib/git-core/">
|
|
AllowOverride None
|
|
Options ExecCGI FollowSymlinks
|
|
Require all granted
|
|
</Directory>
|
|
|
|
<Directory "/usr/lib/cgit/">
|
|
AllowOverride None
|
|
Options ExecCGI FollowSymlinks
|
|
Require all granted
|
|
</Directory>
|
|
</VirtualHost>
|