forked from xombiemp/ultimate-torrent-setup
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapache-portal.conf
99 lines (89 loc) · 2.78 KB
/
apache-portal.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
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
<VirtualHost *:80>
DocumentRoot /var/www
RewriteEngine On
<Directory /var/www>
Options -Indexes
RewriteCond %{HTTPS} !=on
RewriteCond %{REQUEST_URI} !/public
RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R=301,L]
</Directory>
<Location /public>
Require all granted
</Location>
</VirtualHost>
<VirtualHost *:443>
DocumentRoot /var/www
RewriteEngine On
SSLEngine On
SSLProxyEngine On
SSLCertificateFile /etc/apache2/ssl.pem
ProxyPreserveHost On
<Directory /var/www>
Options -Indexes
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_URI} !/logout$
RewriteCond %{REQUEST_URI} !.*/$
RewriteRule ^.*$ %{REQUEST_URI}/ [R=301,L]
</Directory>
<Location /rutorrent>
Require valid-user
AuthType form
AuthFormProvider file
AuthUserFile "/etc/apache2/passwd"
AuthName "My Login"
Session On
SessionMaxAge 1800
SessionCookieName session path=/
SessionCryptoPassphrase secret
ErrorDocument 401 /login.html
</Location>
<LocationMatch /rutorrent/(conf|share)>
Require all denied
</LocationMatch>
<Location /sickbeard>
Require valid-user
AuthType form
AuthFormProvider file
AuthFormLoginSuccessLocation /sickbeard
AuthUserFile "/etc/apache2/passwd"
AuthName "My Login"
Session On
SessionMaxAge 1800
SessionCookieName session path=/
SessionCryptoPassphrase secret
ErrorDocument 401 /login.html
ProxyPass http://localhost:8081/sickbeard
ProxyPassReverse http://localhost:8081/sickbeard
RequestHeader set X-Forwarded-Proto "https"
RequestHeader set X-Forwarded-Port "443"
</Location>
<Location /couchpotato>
Require valid-user
AuthType form
AuthFormProvider file
AuthFormLoginSuccessLocation /couchpotato
AuthUserFile "/etc/apache2/passwd"
AuthName "My Login"
Session On
SessionMaxAge 1800
SessionCookieName session path=/
SessionCryptoPassphrase secret
ErrorDocument 401 /login.html
ProxyPass http://localhost:5050/couchpotato
ProxyPassReverse http://localhost:5050/couchpotato
RequestHeader set X-Forwarded-Proto "https"
RequestHeader set X-Forwarded-Port "443"
</Location>
<LocationMatch /logout$>
SetHandler form-logout-handler
AuthFormLogoutLocation /logout.html
Session On
SessionMaxAge 1
SessionCookieName session path=/
SessionCryptoPassphrase secret
ProxyPass !
</LocationMatch>
<LocationMatch /\.(svn|git)>
Require all denied
</LocationMatch>
</VirtualHost>