-
Notifications
You must be signed in to change notification settings - Fork 1
/
000-default.conf
44 lines (37 loc) · 1.22 KB
/
000-default.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
<VirtualHost *:80>
ServerAdmin webmaster@localhost
Alias /images /var/tmp/upsidedownternet
<Directory /var/tmp/upsidedownternet>
Require ip 127.0.0.1
</Directory>
Alias /git/static /usr/share/gitweb/static
ScriptAliasMatch \
"(?x)^/git/(.*/(HEAD | \
info/refs | \
objects/(info/[^/]+ | \
[0-9a-f]{2}/[0-9a-f]{38} | \
pack/pack-[0-9a-f]{40}\.(pack|idx)) | \
git-upload-pack))$" \
/usr/lib/git-core/git-http-backend/$1
ScriptAlias /git /usr/share/gitweb/gitweb.cgi
<Directory /usr/share/gitweb>
Options +ExecCGI +FollowSymLinks +SymLinksIfOwnerMatch
Require all granted
AddHandler cgi-script cgi
DirectoryIndex gitweb.cgi
</Directory>
<Directory /usr/lib/git-core/>
Options +ExecCGI
SetEnv GIT_PROJECT_ROOT /var/lib/git
Require all granted
</Directory>
RewriteEngine on
RewriteRule ^/images/.* - [L]
RewriteRule .* https://davidsherenowitsa.party%{REQUEST_URI}
ErrorLog ${APACHE_LOG_DIR}/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog ${APACHE_LOG_DIR}/access.log combined
Header always set X-Frame-Options DENY
</VirtualHost>