forked from xombiemp/ultimate-torrent-setup
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapache-portal.conf
120 lines (108 loc) · 3.49 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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
<VirtualHost *:80>
ServerName yourdomain.com
DocumentRoot /var/www
RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteCond %{HTTP_HOST} !=localhost
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
<Directory /var/www>
Options -Indexes
</Directory>
</VirtualHost>
<VirtualHost *:443>
ServerName yourdomain.com
DocumentRoot /var/www
RewriteEngine On
SSLEngine On
SSLProxyEngine On
SSLCertificateFile /etc/letsencrypt/live/yourdomain.com/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/yourdomain.com/privkey.pem
Include /etc/letsencrypt/options-ssl-apache.conf
ProxyPreserveHost On
Header always set Strict-Transport-Security "max-age=31536000; includeSubDomains"
Redirect permanent /gui /rslsync/gui
<Directory /var/www>
Options -Indexes
</Directory>
<Location /public>
Require all granted
</Location>
<Location /rutorrent>
Require valid-user
AuthType form
AuthFormProvider file
AuthUserFile "/etc/apache2/passwd"
AuthName "My Login"
Session On
SessionMaxAge 1800
SessionCookieName session path=/
SessionCryptoPassphrase CHANGEME
ErrorDocument 401 /login.html
</Location>
<LocationMatch /rutorrent/(conf|share)>
Require all denied
</LocationMatch>
<Location /sonarr>
Require valid-user
AuthType form
AuthFormProvider file
AuthFormLoginSuccessLocation /sonarr
AuthUserFile "/etc/apache2/passwd"
AuthName "My Login"
Session On
SessionMaxAge 1800
SessionCookieName session path=/
SessionCryptoPassphrase CHANGEME
ErrorDocument 401 /login.html
ProxyPass http://localhost:8989/sonarr
ProxyPassReverse http://localhost:8989/sonarr
RequestHeader set X-Forwarded-Proto "https"
RequestHeader set X-Forwarded-Port "443"
</Location>
<Location /radarr>
Require valid-user
AuthType form
AuthFormProvider file
AuthFormLoginSuccessLocation /radarr
AuthUserFile "/etc/apache2/passwd"
AuthName "My Login"
Session On
SessionMaxAge 1800
SessionCookieName session path=/
SessionCryptoPassphrase CHANGEME
ErrorDocument 401 /login.html
ProxyPass http://localhost:7878/radarr
ProxyPassReverse http://localhost:7878/radarr
RequestHeader set X-Forwarded-Proto "https"
RequestHeader set X-Forwarded-Port "443"
</Location>
<Location /rslsync>
Require valid-user
AuthType form
AuthFormProvider file
AuthFormLoginSuccessLocation /rslsync
AuthUserFile "/etc/apache2/passwd"
AuthName "My Login"
Session On
SessionMaxAge 1800
SessionCookieName session path=/
SessionCryptoPassphrase CHANGEME
ErrorDocument 401 /login.html
ProxyPass http://localhost:8888
ProxyPassReverse http://localhost:8888
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 CHANGEME
ProxyPass !
</LocationMatch>
<LocationMatch /\.(svn|git)>
Require all denied
</LocationMatch>
</VirtualHost>