summaryrefslogtreecommitdiff
path: root/pinyconfigs/etc/apache2/sites-available/piny
blob: a3c38c928398896623a90f4c2fb0ab8016e8629f (plain)
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
<VirtualHost *:80>
	ServerName piny.be

	DocumentRoot /srv/http/piny.be

	<Directory />
		Options Indexes FollowSymLinks MultiViews
		AllowOverride None
	</Directory>

	Alias /js /usr/share/javascript

	RedirectMatch 301 ^/$ http://piny.be/piny-hosting/

	Include /etc/apache2/piny/www
</VirtualHost>

<VirtualHost *:80>
	ServerName www.piny.be
	RedirectMatch 301 (.*) http://piny.be$1
</VirtualHost>

<VirtualHost *:443>
	ServerName piny.be
	DocumentRoot /srv/https/piny.be

	<Directory />
		Options Indexes FollowSymLinks MultiViews
		AllowOverride None
	</Directory>

	Alias /js /usr/share/javascript

	RedirectMatch 301 ^/$ http://piny.be/piny-hosting/

	SSLEngine On
	SSLCertificateFile /etc/ssl/private/secure.piny.be.pem
	SSLCertificateChainFile /etc/ssl/private/GandiStandardSSLCA.pem

	Include /etc/apache2/piny/www
</VirtualHost>

<VirtualHost *:80>
	ServerName secure.piny.be
	RedirectMatch 301 (.*) https://secure.piny.be$1
</VirtualHost>

<VirtualHost *:443>
	ServerName secure.piny.be
	DocumentRoot /srv/https/secure.piny.be
	RedirectMatch 301 ^/$ http://piny.be/

	<Directory />
		SSLRequireSSL
		Options Indexes FollowSymLinks MultiViews
		AllowOverride None
	</Directory>

	<Directory "/srv/https/secure.piny.be/write">
		SetHandler cgi-script
		Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
	</Directory>

	<Directory "/usr/lib/cgi-bin/piny/auth">
		AuthBasicProvider PAM
		AuthPAMService other
	        AuthBasicAuthoritative off
	        AuthType Basic
	        AuthName "User account for piny.be needed."
	        Require valid-user
	</Directory>

	Alias /_cgit /usr/share/cgit

        ScriptAlias /cgit /usr/lib/cgi-bin/cgit.cgi
        ScriptAlias /piny-newuser /usr/lib/cgi-bin/piny/newuser.cgi
        ScriptAlias /piny-validate /usr/lib/cgi-bin/piny/checkconstraint.cgi
        ScriptAlias /auth /usr/lib/cgi-bin/piny/auth

	SSLEngine On
	SSLCertificateFile /etc/ssl/private/secure.piny.be.pem
	SSLCertificateChainFile /etc/ssl/private/GandiStandardSSLCA.pem

	Include /etc/apache2/piny/secure
</VirtualHost>