Skip to content

Commit e71e744

Browse files
hsbtclaude
andcommitted
Serve /.well-known via DocumentRoot, drop svn webroot
Add Alias for /.well-known/ on git :80 so Let's Encrypt HTTP-01 challenges bypass cgit's global ScriptAlias. svn now redirects all HTTP/HTTPS traffic to git, so its certificate is renewed via the redirect chain through git's webroot instead of its own. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent c65c686 commit e71e744

2 files changed

Lines changed: 9 additions & 5 deletions

File tree

recipes/files/etc/apache2/sites-available/git.ruby-lang.org.conf

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,13 @@
55
# for let's encrypt
66
DocumentRoot /var/www/git.ruby-lang.org
77

8+
Alias /.well-known/ "/var/www/git.ruby-lang.org/.well-known/"
9+
<Directory "/var/www/git.ruby-lang.org/.well-known/">
10+
AllowOverride None
11+
Options Indexes FollowSymlinks
12+
Require all granted
13+
</Directory>
14+
815
RedirectMatch permanent ^/(?!.well-known)(.*) https://git.ruby-lang.org/$1
916
</VirtualHost>
1017

recipes/files/etc/apache2/sites-available/svn.ruby-lang.org.conf

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,7 @@
22
ServerName svn.ruby-lang.org
33
ServerAdmin webmaster@ruby-lang.org
44

5-
# for let's encrypt
6-
DocumentRoot /var/www/svn.ruby-lang.org
7-
8-
RedirectMatch permanent ^/(?!.well-known)(.*) https://git.ruby-lang.org/$1
5+
RedirectMatch permanent ^/(.*) http://git.ruby-lang.org/$1
96
</VirtualHost>
107

118
<VirtualHost *:443>
@@ -16,5 +13,5 @@
1613
SSLCertificateFile /etc/letsencrypt/live/svn.ruby-lang.org/fullchain.pem
1714
SSLCertificateKeyFile /etc/letsencrypt/live/svn.ruby-lang.org/privkey.pem
1815

19-
RedirectMatch permanent ^/(?!.well-known)(.*) https://git.ruby-lang.org/$1
16+
RedirectMatch permanent ^/(.*) https://git.ruby-lang.org/$1
2017
</VirtualHost>

0 commit comments

Comments
 (0)