FreshRSS.Apache.conf 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. ServerName freshrss.localhost
  2. Listen 80
  3. DocumentRoot /var/www/FreshRSS/p/
  4. RemoteIPHeader X-Forwarded-For
  5. RemoteIPTrustedProxy 10.0.0.1/8 172.16.0.1/12 192.168.0.1/16
  6. LogFormat "%a %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined_proxy
  7. CustomLog "|/var/www/FreshRSS/cli/sensitive-log.sh" combined_proxy
  8. ErrorLog /dev/stderr
  9. AllowEncodedSlashes On
  10. ServerTokens OS
  11. TraceEnable Off
  12. <IfDefine OIDC_ENABLED>
  13. <IfModule !auth_openidc_module>
  14. Error "The auth_openidc_module is not available. Install it or unset environment variable OIDC_ENABLED."
  15. </IfModule>
  16. # Workaround to be able to check whether an environment variable is set
  17. # See: https://serverfault.com/questions/1022233/using-ifdefine-with-environment-variables/1022234#1022234
  18. Define VStart "${"
  19. Define VEnd "}"
  20. OIDCProviderMetadataURL ${OIDC_PROVIDER_METADATA_URL}
  21. OIDCClientID ${OIDC_CLIENT_ID}
  22. OIDCClientSecret ${OIDC_CLIENT_SECRET}
  23. OIDCRedirectURI /i/oidc/
  24. OIDCCryptoPassphrase ${OIDC_CLIENT_CRYPTO_KEY}
  25. Define "Test_${OIDC_REMOTE_USER_CLAIM}"
  26. <IfDefine Test_${VStart}OIDC_REMOTE_USER_CLAIM${VEnd}>
  27. OIDCRemoteUserClaim preferred_username
  28. </IfDefine>
  29. <IfDefine !Test_${VStart}OIDC_REMOTE_USER_CLAIM${VEnd}>
  30. OIDCRemoteUserClaim "${OIDC_REMOTE_USER_CLAIM}"
  31. </IfDefine>
  32. Define "Test_${OIDC_SCOPES}"
  33. <IfDefine Test_${VStart}OIDC_SCOPES${VEnd}>
  34. OIDCScope openid
  35. </IfDefine>
  36. <IfDefine !Test_${VStart}OIDC_SCOPES${VEnd}>
  37. OIDCScope "${OIDC_SCOPES}"
  38. </IfDefine>
  39. Define "Test_${OIDC_X_FORWARDED_HEADERS}"
  40. <IfDefine !Test_${VStart}OIDC_X_FORWARDED_HEADERS${VEnd}>
  41. OIDCXForwardedHeaders ${OIDC_X_FORWARDED_HEADERS}
  42. </IfDefine>
  43. OIDCRefreshAccessTokenBeforeExpiry 30
  44. </IfDefine>
  45. <Directory />
  46. AllowOverride None
  47. Options FollowSymLinks
  48. Require all denied
  49. </Directory>
  50. <Directory /var/www/FreshRSS/p>
  51. AllowOverride None
  52. Include /var/www/FreshRSS/p/.htaccess
  53. Options FollowSymLinks
  54. Require all granted
  55. </Directory>
  56. <Directory /var/www/FreshRSS/p/api>
  57. Include /var/www/FreshRSS/p/api/.htaccess
  58. </Directory>
  59. <Directory /var/www/FreshRSS/p/i>
  60. ExpiresActive Off
  61. <IfDefine OIDC_ENABLED>
  62. AuthType openid-connect
  63. Require valid-user
  64. </IfDefine>
  65. IncludeOptional /var/www/FreshRSS/p/i/.htaccess
  66. </Directory>
  67. <Directory /var/www/FreshRSS/p/themes>
  68. Include /var/www/FreshRSS/p/themes/.htaccess
  69. </Directory>