radicale.conf 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249
  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 set X-Forwarded-Proto expr=%{REQUEST_SCHEME}
  32. ProxyPass http://localhost:5232/ retry=0
  33. ProxyPassReverse http://localhost:5232/
  34. ## User authentication handled by "radicale"
  35. Require local
  36. <IfDefine RADICALE_PERMIT_PUBLIC_ACCESS>
  37. Require all granted
  38. </IfDefine>
  39. ## You may want to use apache's authentication (config: [auth] type = http_x_remote_user)
  40. ## e.g. create a new file with a testuser: htpasswd -c -B /etc/httpd/conf/htpasswd-radicale testuser
  41. #AuthBasicProvider file
  42. #AuthType Basic
  43. #AuthName "Enter your credentials"
  44. #AuthUserFile /etc/httpd/conf/htpasswd-radicale
  45. #AuthGroupFile /dev/null
  46. #Require valid-user
  47. #RequestHeader set X-Remote-User expr=%{REMOTE_USER}
  48. <IfDefine RADICALE_ENFORCE_SSL>
  49. <IfModule !ssl_module>
  50. Error "RADICALE_ENFORCE_SSL selected but ssl module not loaded/enabled"
  51. </IfModule>
  52. SSLRequireSSL
  53. </IfDefine>
  54. </Location>
  55. </IfDefine>
  56. ## RADICALE_SERVER_WSGI
  57. # For more information, visit:
  58. # http://radicale.org/user_documentation/#idapache-and-mod-wsgi
  59. <IfDefine RADICALE_SERVER_WSGI>
  60. <IfModule wsgi_module>
  61. <Files /usr/share/radicale/radicale.wsgi>
  62. SetHandler wsgi-script
  63. Require local
  64. <IfDefine RADICALE_PERMIT_PUBLIC_ACCESS>
  65. Require all granted
  66. </IfDefine>
  67. </Files>
  68. WSGIDaemonProcess radicale user=radicale group=radicale threads=1 umask=0027
  69. WSGIProcessGroup radicale
  70. WSGIApplicationGroup %{GLOBAL}
  71. WSGIPassAuthorization On
  72. WSGIScriptAlias /radicale /usr/share/radicale/radicale.wsgi
  73. <Location /radicale>
  74. RequestHeader set X-Script-Name /radicale
  75. ## User authentication handled by "radicale"
  76. Require local
  77. <IfDefine RADICALE_PERMIT_PUBLIC_ACCESS>
  78. Require all granted
  79. </IfDefine>
  80. ## You may want to use apache's authentication (config: [auth] type = http_x_remote_user)
  81. ## e.g. create a new file with a testuser: htpasswd -c -B /etc/httpd/conf/htpasswd-radicale testuser
  82. #AuthBasicProvider file
  83. #AuthType Basic
  84. #AuthName "Enter your credentials"
  85. #AuthUserFile /etc/httpd/conf/htpasswd-radicale
  86. #AuthGroupFile /dev/null
  87. #Require valid-user
  88. #RequestHeader set X-Remote-User expr=%{REMOTE_USER}
  89. <IfDefine RADICALE_ENFORCE_SSL>
  90. <IfModule !ssl_module>
  91. Error "RADICALE_ENFORCE_SSL selected but ssl module not loaded/enabled"
  92. </IfModule>
  93. SSLRequireSSL
  94. </IfDefine>
  95. </Location>
  96. </IfModule>
  97. <IfModule !wsgi_module>
  98. Error "RADICALE_SERVER_WSGI selected but wsgi module not loaded/enabled"
  99. </IfModule>
  100. </IfDefine>
  101. </IfDefine>
  102. ##########################
  103. ### VHOST with SSL
  104. ##########################
  105. <IfDefine RADICALE_SERVER_VHOST_SSL>
  106. <IfModule ssl_module>
  107. Listen 8443 https
  108. <VirtualHost _default_:8443>
  109. ## taken from ssl.conf
  110. #ServerName www.example.com:443
  111. ErrorLog logs/ssl_error_log
  112. TransferLog logs/ssl_access_log
  113. LogLevel warn
  114. SSLEngine on
  115. SSLProtocol all -SSLv3 -TLSv1 -TLSv1.1
  116. SSLProxyProtocol all -SSLv3 -TLSv1 -TLSv1.1
  117. SSLHonorCipherOrder on
  118. SSLCipherSuite PROFILE=SYSTEM
  119. SSLProxyCipherSuite PROFILE=SYSTEM
  120. SSLCertificateFile /etc/pki/tls/certs/localhost.crt
  121. SSLCertificateKeyFile /etc/pki/tls/private/localhost.key
  122. #SSLCertificateChainFile /etc/pki/tls/certs/server-chain.crt
  123. #SSLCACertificateFile /etc/pki/tls/certs/ca-bundle.crt
  124. #SSLVerifyClient require
  125. #SSLVerifyDepth 10
  126. #SSLOptions +FakeBasicAuth +ExportCertData +StrictRequire
  127. BrowserMatch "MSIE [2-5]" \ nokeepalive ssl-unclean-shutdown \ downgrade-1.0 force-response-1.0
  128. CustomLog logs/ssl_request_log "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"
  129. ## RADICALE_SERVER_REVERSE_PROXY
  130. <IfDefine RADICALE_SERVER_REVERSE_PROXY>
  131. <Location />
  132. RequestHeader set X-Script-Name /
  133. RequestHeader set X-Forwarded-Port "%{SERVER_PORT}s"
  134. RequestHeader set X-Forwarded-Proto expr=%{REQUEST_SCHEME}
  135. ProxyPass http://localhost:5232/ retry=0
  136. ProxyPassReverse http://localhost:5232/
  137. ## User authentication handled by "radicale"
  138. Require local
  139. <IfDefine RADICALE_PERMIT_PUBLIC_ACCESS>
  140. Require all granted
  141. </IfDefine>
  142. ## You may want to use apache's authentication (config: [auth] type = http_x_remote_user)
  143. ## e.g. create a new file with a testuser: htpasswd -c -B /etc/httpd/conf/htpasswd-radicale testuser
  144. #AuthBasicProvider file
  145. #AuthType Basic
  146. #AuthName "Enter your credentials"
  147. #AuthUserFile /etc/httpd/conf/htpasswd-radicale
  148. #AuthGroupFile /dev/null
  149. #Require valid-user
  150. </Location>
  151. </IfDefine>
  152. ## RADICALE_SERVER_WSGI
  153. # For more information, visit:
  154. # http://radicale.org/user_documentation/#idapache-and-mod-wsgi
  155. <IfDefine RADICALE_SERVER_WSGI>
  156. <IfModule wsgi_module>
  157. <Files /usr/share/radicale/radicale.wsgi>
  158. SetHandler wsgi-script
  159. Require local
  160. <IfDefine RADICALE_PERMIT_PUBLIC_ACCESS>
  161. Require all granted
  162. </IfDefine>
  163. </Files>
  164. WSGIDaemonProcess radicale user=radicale group=radicale threads=1 umask=0027
  165. WSGIProcessGroup radicale
  166. WSGIApplicationGroup %{GLOBAL}
  167. WSGIPassAuthorization On
  168. WSGIScriptAlias / /usr/share/radicale/radicale.wsgi
  169. <Location />
  170. RequestHeader set X-Script-Name /
  171. ## User authentication handled by "radicale"
  172. Require local
  173. <IfDefine RADICALE_PERMIT_PUBLIC_ACCESS>
  174. Require all granted
  175. </IfDefine>
  176. ## You may want to use apache's authentication (config: [auth] type = http_x_remote_user)
  177. ## e.g. create a new file with a testuser: htpasswd -c -B /etc/httpd/conf/htpasswd-radicale testuser
  178. #AuthBasicProvider file
  179. #AuthType Basic
  180. #AuthName "Enter your credentials"
  181. #AuthUserFile /etc/httpd/conf/htpasswd-radicale
  182. #AuthGroupFile /dev/null
  183. #Require valid-user
  184. </Location>
  185. </IfModule>
  186. <IfModule !wsgi_module>
  187. Error "RADICALE_SERVER_WSGI selected but wsgi module not loaded/enabled"
  188. </IfModule>
  189. </IfDefine>
  190. </VirtualHost>
  191. </IfModule>
  192. <IfModule !ssl_module>
  193. Error "RADICALE_SERVER_VHOST_SSL selected but ssl module not loaded/enabled"
  194. </IfModule>
  195. </IfDefine>