FreshRSS.Apache.conf 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  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. # For logging the original user-agent IP instead of proxy IPs:
  9. <IfModule mod_remoteip.c>
  10. # Can be disabled by setting the TRUSTED_PROXY environment variable to 0:
  11. RemoteIPHeader X-Forwarded-For
  12. # Can be overridden by the TRUSTED_PROXY environment variable:
  13. RemoteIPInternalProxy 10.0.0.1/8 172.16.0.1/12 192.168.0.1/16
  14. </IfModule>
  15. LogFormat "%a %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined_proxy
  16. CustomLog "|/var/www/FreshRSS/cli/sensitive-log.sh" combined_proxy
  17. <IfDefine OIDC_ENABLED>
  18. <IfModule !auth_openidc_module>
  19. Error "The auth_openidc_module is not available. Install it or unset environment variable OIDC_ENABLED."
  20. </IfModule>
  21. # Workaround to be able to check whether an environment variable is set
  22. # See: https://serverfault.com/questions/1022233/using-ifdefine-with-environment-variables/1022234#1022234
  23. Define VStart "${"
  24. Define VEnd "}"
  25. OIDCProviderMetadataURL ${OIDC_PROVIDER_METADATA_URL}
  26. OIDCClientID ${OIDC_CLIENT_ID}
  27. OIDCClientSecret ${OIDC_CLIENT_SECRET}
  28. OIDCSessionInactivityTimeout ${OIDC_SESSION_INACTIVITY_TIMEOUT}
  29. OIDCSessionMaxDuration ${OIDC_SESSION_MAX_DURATION}
  30. OIDCSessionType ${OIDC_SESSION_TYPE}
  31. OIDCRedirectURI /i/oidc/
  32. OIDCCryptoPassphrase ${OIDC_CLIENT_CRYPTO_KEY}
  33. Define "Test_${OIDC_REMOTE_USER_CLAIM}"
  34. <IfDefine Test_${VStart}OIDC_REMOTE_USER_CLAIM${VEnd}>
  35. OIDCRemoteUserClaim preferred_username
  36. </IfDefine>
  37. <IfDefine !Test_${VStart}OIDC_REMOTE_USER_CLAIM${VEnd}>
  38. OIDCRemoteUserClaim "${OIDC_REMOTE_USER_CLAIM}"
  39. </IfDefine>
  40. Define "Test_${OIDC_SCOPES}"
  41. <IfDefine Test_${VStart}OIDC_SCOPES${VEnd}>
  42. OIDCScope openid
  43. </IfDefine>
  44. <IfDefine !Test_${VStart}OIDC_SCOPES${VEnd}>
  45. OIDCScope "${OIDC_SCOPES}"
  46. </IfDefine>
  47. Define "Test_${OIDC_X_FORWARDED_HEADERS}"
  48. <IfDefine !Test_${VStart}OIDC_X_FORWARDED_HEADERS${VEnd}>
  49. OIDCXForwardedHeaders ${OIDC_X_FORWARDED_HEADERS}
  50. </IfDefine>
  51. # Additional parameters can be set e.g. in /var/www/FreshRSS/p/i/.htaccess
  52. </IfDefine>
  53. <Directory />
  54. AllowOverride None
  55. Options FollowSymLinks
  56. Require all denied
  57. </Directory>
  58. <Directory /var/www/FreshRSS/p>
  59. AllowOverride None
  60. Include /var/www/FreshRSS/p/.htaccess
  61. Options FollowSymLinks
  62. Require all granted
  63. </Directory>
  64. <Directory /var/www/FreshRSS/p/api>
  65. Include /var/www/FreshRSS/p/api/.htaccess
  66. </Directory>
  67. <Directory /var/www/FreshRSS/p/i>
  68. ExpiresActive Off
  69. <IfDefine OIDC_ENABLED>
  70. AuthType openid-connect
  71. Require valid-user
  72. </IfDefine>
  73. IncludeOptional /var/www/FreshRSS/p/i/.htaccess
  74. </Directory>
  75. <Directory /var/www/FreshRSS/p/themes>
  76. Include /var/www/FreshRSS/p/themes/.htaccess
  77. </Directory>