forked from Notos/seedbox-from-scratch
-
Notifications
You must be signed in to change notification settings - Fork 17
/
etc.apache2.default.template
175 lines (153 loc) · 5.17 KB
/
etc.apache2.default.template
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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
#
#
# The Seedbox From Scratch Script
# By Notos ---> https://github.com/Notos/
# Modified by dannyti ---> https://github.com/dannyti/
#
#
######################################################################
#
# Copyright (c) 2015 dannyti (https://github.com/dannyti/)
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
# --> Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php
#
######################################################################
#
<VirtualHost *:80>
ServerAdmin webmaster@localhost
ServerName <servername>
DocumentRoot /var/www/
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteCond %{REQUEST_URI} !^\/share\/
RewriteRule (.*) https://%{HTTP_HOST}:443%{REQUEST_URI}
RewriteCond %{LA-U:remote_user} !^$
RewriteRule ^/private(.*) /home/%{LA-U:remote_user}/private$1
<Directory />
Options FollowSymLinks
AllowOverride All
</Directory>
<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
IndexOptions +FancyIndexing +SuppressDescription
AllowOverride None
Order allow,deny
allow from all
AuthType Digest
AuthName "documentroot"
AuthDigestProvider file
AuthUserFile /etc/apache2/htpasswd
Require user <username>
</Directory>
<Location /private>
Options Indexes FollowSymLinks MultiViews
IndexOptions +FancyIndexing +SuppressDescription
AuthType Digest
AuthName "private"
AuthDigestDomain /var/www/private
AuthDigestProvider file
AuthUserFile /etc/apache2/htpasswd
Require valid-user
</Location>
<Directory /var/www/share/>
Order Deny,Allow
Allow from all
Satisfy any
</Directory>
<Directory /var/www/rapidleech/>
Order Deny,Allow
Allow from all
Satisfy any
</Directory>
<Directory /var/www/stream/>
Order Deny,Allow
Allow from all
Satisfy any
</Directory>
ErrorLog /var/log/apache2/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog /var/log/apache2/access.log combined
<Directory /var/www/rutorrent>
AuthType Digest
AuthName "rutorrent"
AuthDigestDomain /var/www/rutorrent/ http://<servername>/rutorrent
AuthDigestProvider file
AuthUserFile /etc/apache2/htpasswd
Require valid-user
SetEnv R_ENV "/var/www/rutorrent"
</Directory>
</VirtualHost>
<VirtualHost *:443>
ServerAdmin webmaster@localhost
ServerName <servername>
SSLEngine on
SSLCertificateFile /etc/seedbox-from-scratch/ssl/cert.pem
SSLCertificateKeyFile /etc/seedbox-from-scratch/ssl/key.pem
DocumentRoot /var/www/
RewriteEngine On
RewriteCond %{LA-U:remote_user} !^$
RewriteRule ^/private(.*) /home/%{LA-U:remote_user}/private$1
<Directory />
Options FollowSymLinks
AllowOverride All
</Directory>
<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
IndexOptions +FancyIndexing +SuppressDescription
AllowOverride None
Order allow,deny
allow from all
AuthType Digest
AuthName "documentroot"
AuthDigestProvider file
AuthUserFile /etc/apache2/htpasswd
Require user <username>
</Directory>
<Location /private>
Options Indexes FollowSymLinks MultiViews
IndexOptions +FancyIndexing +SuppressDescription
AuthType Digest
AuthName "private"
AuthDigestDomain /var/www/private
AuthDigestProvider file
AuthUserFile /etc/apache2/htpasswd
Require valid-user
</Location>
<Directory /var/www/share/>
Order Deny,Allow
Allow from all
Satisfy any
</Directory>
<Directory /var/www/rapidleech/>
Order Deny,Allow
Allow from all
Satisfy any
</Directory>
<Directory /var/www/stream/>
Order Deny,Allow
Allow from all
Satisfy any
</Directory>
ErrorLog /var/log/apache2/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog /var/log/apache2/access.log combined
<Directory /var/www/rutorrent>
AuthType Digest
AuthName "rutorrent"
AuthDigestDomain /var/www/rutorrent/ https://<servername>/rutorrent
AuthDigestProvider file
AuthUserFile /etc/apache2/htpasswd
Require valid-user
SetEnv R_ENV "/var/www/rutorrent"
</Directory>
</VirtualHost>