ZSCGR commited on
Commit
da42e2b
·
verified ·
1 Parent(s): 245e677

Create FreshRSS.Apache.conf

Browse files
Files changed (1) hide show
  1. FreshRSS.Apache.conf +88 -0
FreshRSS.Apache.conf ADDED
@@ -0,0 +1,88 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ServerName freshrss.localhost
2
+ Listen 80
3
+ DocumentRoot /var/www/FreshRSS/p/
4
+ AllowEncodedSlashes On
5
+ ServerTokens OS
6
+ TraceEnable Off
7
+ ErrorLog /dev/stderr
8
+
9
+ # For logging the original user-agent IP instead of proxy IPs:
10
+ <IfModule mod_remoteip.c>
11
+ # Can be disabled by setting the TRUSTED_PROXY environment variable to 0:
12
+ RemoteIPHeader X-Forwarded-For
13
+ # Can be overridden by the TRUSTED_PROXY environment variable:
14
+ RemoteIPInternalProxy 10.0.0.1/8 172.16.0.1/12 192.168.0.1/16
15
+ </IfModule>
16
+
17
+ LogFormat "%a %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined_proxy
18
+ CustomLog "|/var/www/FreshRSS/cli/sensitive-log.sh" combined_proxy
19
+
20
+ <IfDefine OIDC_ENABLED>
21
+ <IfModule !auth_openidc_module>
22
+ Error "The auth_openidc_module is not available. Install it or unset environment variable OIDC_ENABLED."
23
+ </IfModule>
24
+
25
+ # Workaround to be able to check whether an environment variable is set
26
+ # See: https://serverfault.com/questions/1022233/using-ifdefine-with-environment-variables/1022234#1022234
27
+ Define VStart "${"
28
+ Define VEnd "}"
29
+
30
+ OIDCProviderMetadataURL ${OIDC_PROVIDER_METADATA_URL}
31
+ OIDCClientID ${OIDC_CLIENT_ID}
32
+ OIDCClientSecret ${OIDC_CLIENT_SECRET}
33
+
34
+ OIDCRedirectURI /i/oidc/
35
+ OIDCCryptoPassphrase ${OIDC_CLIENT_CRYPTO_KEY}
36
+
37
+ Define "Test_${OIDC_REMOTE_USER_CLAIM}"
38
+ <IfDefine Test_${VStart}OIDC_REMOTE_USER_CLAIM${VEnd}>
39
+ OIDCRemoteUserClaim preferred_username
40
+ </IfDefine>
41
+ <IfDefine !Test_${VStart}OIDC_REMOTE_USER_CLAIM${VEnd}>
42
+ OIDCRemoteUserClaim "${OIDC_REMOTE_USER_CLAIM}"
43
+ </IfDefine>
44
+ Define "Test_${OIDC_SCOPES}"
45
+ <IfDefine Test_${VStart}OIDC_SCOPES${VEnd}>
46
+ OIDCScope openid
47
+ </IfDefine>
48
+ <IfDefine !Test_${VStart}OIDC_SCOPES${VEnd}>
49
+ OIDCScope "${OIDC_SCOPES}"
50
+ </IfDefine>
51
+ Define "Test_${OIDC_X_FORWARDED_HEADERS}"
52
+ <IfDefine !Test_${VStart}OIDC_X_FORWARDED_HEADERS${VEnd}>
53
+ OIDCXForwardedHeaders ${OIDC_X_FORWARDED_HEADERS}
54
+ </IfDefine>
55
+
56
+ OIDCRefreshAccessTokenBeforeExpiry 30
57
+ </IfDefine>
58
+
59
+ <Directory />
60
+ AllowOverride None
61
+ Options FollowSymLinks
62
+ Require all denied
63
+ </Directory>
64
+
65
+ <Directory /var/www/FreshRSS/p>
66
+ AllowOverride None
67
+ Include /var/www/FreshRSS/p/.htaccess
68
+ Options FollowSymLinks
69
+ Require all granted
70
+ </Directory>
71
+
72
+ <Directory /var/www/FreshRSS/p/api>
73
+ Include /var/www/FreshRSS/p/api/.htaccess
74
+ </Directory>
75
+
76
+ <Directory /var/www/FreshRSS/p/i>
77
+ ExpiresActive Off
78
+
79
+ <IfDefine OIDC_ENABLED>
80
+ AuthType openid-connect
81
+ Require valid-user
82
+ </IfDefine>
83
+ IncludeOptional /var/www/FreshRSS/p/i/.htaccess
84
+ </Directory>
85
+
86
+ <Directory /var/www/FreshRSS/p/themes>
87
+ Include /var/www/FreshRSS/p/themes/.htaccess
88
+ </Directory>