radicale.conf 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246
  1. ### Define how Apache should serve "radicale"
  2. ## !!! Do not enable both at the same time !!!
  3. ## Apache acting as reverse proxy and forward requests via ProxyPass to a running "radicale" server
  4. # SELinux WARNING: To use this correctly, you will need to set:
  5. # setsebool -P httpd_can_network_connect=1
  6. #Define RADICALE_SERVER_REVERSE_PROXY
  7. ## Apache starting WSGI server running with "radicale" application
  8. # MAY CONFLICT with other WSG servers on same system -> use then inside a VirtualHost
  9. # SELinux WARNING: To use this correctly, you will need to set:
  10. # setsebool -P httpd_can_read_write_radicale=1
  11. #Define RADICALE_SERVER_WSGI
  12. ### Extra options
  13. ## Apache starting a dedicated VHOST with SSL
  14. #Define RADICALE_SERVER_VHOST_SSL
  15. ### permit public access to "radicale"
  16. #Define RADICALE_PERMIT_PUBLIC_ACCESS
  17. ### enforce SSL on default host
  18. #Define RADICALE_ENFORCE_SSL
  19. ### Particular configuration EXAMPLES, adjust/extend/override to your needs
  20. ##########################
  21. ### default host
  22. ##########################
  23. <IfDefine !RADICALE_SERVER_VHOST_SSL>
  24. ## RADICALE_SERVER_REVERSE_PROXY
  25. <IfDefine RADICALE_SERVER_REVERSE_PROXY>
  26. RewriteEngine On
  27. RewriteRule ^/radicale$ /radicale/ [R,L]
  28. <Location /radicale>
  29. RequestHeader set X-Script-Name /radicale
  30. RequestHeader set X-Forwarded-Port "%{SERVER_PORT}s"
  31. RequestHeader unset X-Forwarded-Proto
  32. <If "%{HTTPS} =~ /on/">
  33. RequestHeader set X-Forwarded-Proto "https"
  34. </If>
  35. ProxyPass http://localhost:5232/ retry=0
  36. ProxyPassReverse http://localhost:5232/
  37. ## User authentication handled by "radicale"
  38. Require local
  39. <IfDefine RADICALE_PERMIT_PUBLIC_ACCESS>
  40. Require all granted
  41. </IfDefine>
  42. ## You may want to use apache's authentication (config: [auth] type = remote_user)
  43. #AuthBasicProvider file
  44. #AuthType Basic
  45. #AuthName "Enter your credentials"
  46. #AuthUserFile /path/to/httpdfile/
  47. #AuthGroupFile /dev/null
  48. #Require valid-user
  49. <IfDefine RADICALE_ENFORCE_SSL>
  50. <IfModule !ssl_module>
  51. Error "RADICALE_ENFORCE_SSL selected but ssl module not loaded/enabled"
  52. </IfModule>
  53. SSLRequireSSL
  54. </IfDefine>
  55. </Location>
  56. </IfDefine>
  57. ## RADICALE_SERVER_WSGI
  58. # For more information, visit:
  59. # http://radicale.org/user_documentation/#idapache-and-mod-wsgi
  60. <IfDefine RADICALE_SERVER_WSGI>
  61. <IfModule wsgi_module>
  62. <Files /usr/share/radicale/radicale.wsgi>
  63. SetHandler wsgi-script
  64. Require local
  65. <IfDefine RADICALE_PERMIT_PUBLIC_ACCESS>
  66. Require all granted
  67. </IfDefine>
  68. </Files>
  69. WSGIDaemonProcess radicale user=radicale group=radicale threads=1 umask=0027
  70. WSGIProcessGroup radicale
  71. WSGIApplicationGroup %{GLOBAL}
  72. WSGIPassAuthorization On
  73. WSGIScriptAlias /radicale /usr/share/radicale/radicale.wsgi
  74. <Location /radicale>
  75. RequestHeader set X-Script-Name /radicale
  76. ## User authentication handled by "radicale"
  77. Require local
  78. <IfDefine RADICALE_PERMIT_PUBLIC_ACCESS>
  79. Require all granted
  80. </IfDefine>
  81. ## You may want to use apache's authentication (config: [auth] type = remote_user)
  82. #AuthBasicProvider file
  83. #AuthType Basic
  84. #AuthName "Enter your credentials"
  85. #AuthUserFile /path/to/httpdfile/
  86. #AuthGroupFile /dev/null
  87. #Require valid-user
  88. <IfDefine RADICALE_ENFORCE_SSL>
  89. <IfModule !ssl_module>
  90. Error "RADICALE_ENFORCE_SSL selected but ssl module not loaded/enabled"
  91. </IfModule>
  92. SSLRequireSSL
  93. </IfDefine>
  94. </Location>
  95. </IfModule>
  96. <IfModule !wsgi_module>
  97. Error "RADICALE_SERVER_WSGI selected but wsgi module not loaded/enabled"
  98. </IfModule>
  99. </IfDefine>
  100. </IfDefine>
  101. ##########################
  102. ### VHOST with SSL
  103. ##########################
  104. <IfDefine RADICALE_SERVER_VHOST_SSL>
  105. <IfModule ssl_module>
  106. Listen 8443 https
  107. <VirtualHost _default_:8443>
  108. ## taken from ssl.conf
  109. #ServerName www.example.com:443
  110. ErrorLog logs/ssl_error_log
  111. TransferLog logs/ssl_access_log
  112. LogLevel warn
  113. SSLEngine on
  114. SSLProtocol all -SSLv3 -TLSv1 -TLSv1.1
  115. SSLProxyProtocol all -SSLv3 -TLSv1 -TLSv1.1
  116. SSLHonorCipherOrder on
  117. SSLCipherSuite PROFILE=SYSTEM
  118. SSLProxyCipherSuite PROFILE=SYSTEM
  119. SSLCertificateFile /etc/pki/tls/certs/localhost.crt
  120. SSLCertificateKeyFile /etc/pki/tls/private/localhost.key
  121. #SSLCertificateChainFile /etc/pki/tls/certs/server-chain.crt
  122. #SSLCACertificateFile /etc/pki/tls/certs/ca-bundle.crt
  123. #SSLVerifyClient require
  124. #SSLVerifyDepth 10
  125. #SSLOptions +FakeBasicAuth +ExportCertData +StrictRequire
  126. BrowserMatch "MSIE [2-5]" \ nokeepalive ssl-unclean-shutdown \ downgrade-1.0 force-response-1.0
  127. CustomLog logs/ssl_request_log "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"
  128. ## RADICALE_SERVER_REVERSE_PROXY
  129. <IfDefine RADICALE_SERVER_REVERSE_PROXY>
  130. <Location />
  131. RequestHeader set X-Script-Name /
  132. RequestHeader set X-Forwarded-Port "%{SERVER_PORT}s"
  133. RequestHeader set X-Forwarded-Proto "https"
  134. ProxyPass http://localhost:5232/ retry=0
  135. ProxyPassReverse http://localhost:5232/
  136. ## User authentication handled by "radicale"
  137. Require local
  138. <IfDefine RADICALE_PERMIT_PUBLIC_ACCESS>
  139. Require all granted
  140. </IfDefine>
  141. ## You may want to use apache's authentication (config: [auth] type = remote_user)
  142. #AuthBasicProvider file
  143. #AuthType Basic
  144. #AuthName "Enter your credentials"
  145. #AuthUserFile /path/to/httpdfile/
  146. #AuthGroupFile /dev/null
  147. #Require valid-user
  148. </Location>
  149. </IfDefine>
  150. ## RADICALE_SERVER_WSGI
  151. # For more information, visit:
  152. # http://radicale.org/user_documentation/#idapache-and-mod-wsgi
  153. <IfDefine RADICALE_SERVER_WSGI>
  154. <IfModule wsgi_module>
  155. <Files /usr/share/radicale/radicale.wsgi>
  156. SetHandler wsgi-script
  157. Require local
  158. <IfDefine RADICALE_PERMIT_PUBLIC_ACCESS>
  159. Require all granted
  160. </IfDefine>
  161. </Files>
  162. WSGIDaemonProcess radicale user=radicale group=radicale threads=1 umask=0027
  163. WSGIProcessGroup radicale
  164. WSGIApplicationGroup %{GLOBAL}
  165. WSGIPassAuthorization On
  166. WSGIScriptAlias / /usr/share/radicale/radicale.wsgi
  167. <Location />
  168. RequestHeader set X-Script-Name /
  169. ## User authentication handled by "radicale"
  170. Require local
  171. <IfDefine RADICALE_PERMIT_PUBLIC_ACCESS>
  172. Require all granted
  173. </IfDefine>
  174. ## You may want to use apache's authentication (config: [auth] type = remote_user)
  175. #AuthBasicProvider file
  176. #AuthType Basic
  177. #AuthName "Enter your credentials"
  178. #AuthUserFile /path/to/httpdfile/
  179. #AuthGroupFile /dev/null
  180. #Require valid-user
  181. </Location>
  182. </IfModule>
  183. <IfModule !wsgi_module>
  184. Error "RADICALE_SERVER_WSGI selected but wsgi module not loaded/enabled"
  185. </IfModule>
  186. </IfDefine>
  187. </VirtualHost>
  188. </IfModule>
  189. <IfModule !ssl_module>
  190. Error "RADICALE_SERVER_VHOST_SSL selected but ssl module not loaded/enabled"
  191. </IfModule>
  192. </IfDefine>