radicale.conf 7.1 KB

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