httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Leander Schäfer <i...@netocean.de>
Subject [users@httpd] Apache 24 & DAViCal issue with mod_rewrite
Date Fri, 22 May 2015 16:33:43 GMT
Hi

I have a fully functional DAViCal installation. Clients can connect the 
regular way via URL like:

https://DAViCal.Hostname.MyDomain.Local/caldav.php/username/collection

while "collection" stands for a calendar or addressbook name. Now I also 
need to make it possible that clients can provide the information 
"username" and "collection" via subdomain instead of directories in the 
end. So a URL like this:

https://calendar.username.davical.hostname.mydomain.local

should be converted to this:

https://davical.hostname.mydomain.local/caldav.php/username/collection

I thought this should be quite easy to be done. So this is the solution 
I came up with. Clients can successfully authenticate with it, but no 
read nor write to collections seems possible. So somewhere the data 
transfer gets stuck and I could se a 405 error (method not allowd) in 
httpd-error.log. So somehow I'm missing something?! I just can't figure 
out what.


# ========================= relevant part of vHost.conf

AcceptPathInfo On

<IfModule mod_fcgid.c>
   FcgidPassHeader Authorization
</IfModule>

<IfModule mod_proxy.c>
   SSLProxyEngine on
   <ifModule mod_rewrite.c>
     <If "(%{SERVER_NAME} =~ m#^.*\..*\.DaviCal\..*$#i)">
       RewriteEngine on
       RewriteCond %{HTTP_HOST} ^(.*)\.(.*)\.(DaviCal\..*)/?(.*) [NC]
       RewriteRule ^(.*)$ https://%3/htdocs/caldav.php/%2/%1/%4 
[E=WEBDAV:true,E=REDIRECT_WEBDAV:true,E=REMOTE_USER:%{HTTP:Authorization},NC,QSA,L,P]
     </If>
   </IfModule>
</IfModule>


# ========================= LogLevel warn rewrite:trace3

This is after opening a new calendar through Thunderbird

[Fri May 22 15:50:48.577071 2015] [rewrite:trace2] [pid 69540:tid 
34540184576] mod_rewrite.c(475): [client 192.168.10.233:57662] 
192.168.10.233 - - 
[calendar.username.davical.hostname.mydomain.local/sid#802a19438][rid#80b03e0a0/initial] 
init rewrite engine with requested uri /
[Fri May 22 15:50:48.577162 2015] [rewrite:trace1] [pid 69540:tid 
34540184576] mod_rewrite.c(475): [client 192.168.10.233:57662] 
192.168.10.233 - - 
[calendar.username.davical.hostname.mydomain.local/sid#802a19438][rid#80b03e0a0/initial] 
pass through /
[Fri May 22 15:50:48.577769 2015] [rewrite:trace3] [pid 69540:tid 
34540184576] mod_rewrite.c(475): [client 192.168.10.233:57662] 
192.168.10.233 - - 
[calendar.username.davical.hostname.mydomain.local/sid#802a19438][rid#80b03e0a0/initial] 
[perdir *If/] applying pattern '^(.*)$' to uri 
'/usr/local/www/davical.hostname.mydomain.local/sites/'
[Fri May 22 15:50:48.577826 2015] [rewrite:trace2] [pid 69540:tid 
34540184576] mod_rewrite.c(475): [client 192.168.10.233:57662] 
192.168.10.233 - - 
[calendar.username.davical.hostname.mydomain.local/sid#802a19438][rid#80b03e0a0/initial] 
[perdir *If/] rewrite 
'/usr/local/www/davical.hostname.mydomain.local/sites/' -> 
'https://davical.hostname.mydomain.local/htdocs/caldav.php/username/calendar/'
[Fri May 22 15:50:48.577851 2015] [rewrite:trace2] [pid 69540:tid 
34540184576] mod_rewrite.c(475): [client 192.168.10.233:57662] 
192.168.10.233 - - 
[calendar.username.davical.hostname.mydomain.local/sid#802a19438][rid#80b03e0a0/initial] 
[perdir *If/] escaped URI in per-dir context for proxy, 
https://davical.hostname.mydomain.local/htdocs/caldav.php/username/calendar/ 
-> 
https://davical.hostname.mydomain.local/htdocs/caldav.php/username/calendar/
[Fri May 22 15:50:48.577868 2015] [rewrite:trace2] [pid 69540:tid 
34540184576] mod_rewrite.c(475): [client 192.168.10.233:57662] 
192.168.10.233 - - 
[calendar.username.davical.hostname.mydomain.local/sid#802a19438][rid#80b03e0a0/initial] 
[perdir *If/] forcing proxy-throughput with 
https://davical.hostname.mydomain.local/htdocs/caldav.php/username/calendar/
[Fri May 22 15:50:48.577884 2015] [rewrite:trace1] [pid 69540:tid 
34540184576] mod_rewrite.c(475): [client 192.168.10.233:57662] 
192.168.10.233 - - 
[calendar.username.davical.hostname.mydomain.local/sid#802a19438][rid#80b03e0a0/initial] 
[perdir *If/] go-ahead with proxy request 
proxy:https://davical.hostname.mydomain.local/htdocs/caldav.php/username/calendar/ 
[OK]
[Fri May 22 15:50:48.577967 2015] [rewrite:trace2] [pid 69540:tid 
34540184576] mod_rewrite.c(475): [client 192.168.10.233:57662] 
192.168.10.233 - - 
[calendar.username.davical.hostname.mydomain.local/sid#802a19438][rid#80b10e0a0/subreq] 
init rewrite engine with requested uri /index.html
[Fri May 22 15:50:48.577986 2015] [rewrite:trace1] [pid 69540:tid 
34540184576] mod_rewrite.c(475): [client 192.168.10.233:57662] 
192.168.10.233 - - 
[calendar.username.davical.hostname.mydomain.local/sid#802a19438][rid#80b10e0a0/subreq] 
pass through /index.html
[Fri May 22 15:50:48.578261 2015] [rewrite:trace3] [pid 69540:tid 
34540184576] mod_rewrite.c(475): [client 192.168.10.233:57662] 
192.168.10.233 - - 
[calendar.username.davical.hostname.mydomain.local/sid#802a19438][rid#80b10e0a0/subreq] 
[perdir *If/] applying pattern '^(.*)$' to uri 
'/usr/local/www/davical.hostname.mydomain.local/sites/index.html'
[Fri May 22 15:50:48.578305 2015] [rewrite:trace2] [pid 69540:tid 
34540184576] mod_rewrite.c(475): [client 192.168.10.233:57662] 
192.168.10.233 - - 
[calendar.username.davical.hostname.mydomain.local/sid#802a19438][rid#80b10e0a0/subreq] 
[perdir *If/] rewrite 
'/usr/local/www/davical.hostname.mydomain.local/sites/index.html' -> 
'https://davical.hostname.mydomain.local/htdocs/caldav.php/username/calendar/'
[Fri May 22 15:50:48.578336 2015] [rewrite:trace2] [pid 69540:tid 
34540184576] mod_rewrite.c(475): [client 192.168.10.233:57662] 
192.168.10.233 - - 
[calendar.username.davical.hostname.mydomain.local/sid#802a19438][rid#80b10e0a0/subreq] 
[perdir *If/] escaped URI in per-dir context for proxy, 
https://davical.hostname.mydomain.local/htdocs/caldav.php/username/calendar/ 
-> 
https://davical.hostname.mydomain.local/htdocs/caldav.php/username/calendar/
[Fri May 22 15:50:48.578391 2015] [rewrite:trace2] [pid 69540:tid 
34540184576] mod_rewrite.c(475): [client 192.168.10.233:57662] 
192.168.10.233 - - 
[calendar.username.davical.hostname.mydomain.local/sid#802a19438][rid#80b10e0a0/subreq] 
[perdir *If/] forcing proxy-throughput with 
https://davical.hostname.mydomain.local/htdocs/caldav.php/username/calendar/
[Fri May 22 15:50:48.578409 2015] [rewrite:trace1] [pid 69540:tid 
34540184576] mod_rewrite.c(475): [client 192.168.10.233:57662] 
192.168.10.233 - - 
[calendar.username.davical.hostname.mydomain.local/sid#802a19438][rid#80b10e0a0/subreq] 
[perdir *If/] go-ahead with proxy request 
proxy:https://davical.hostname.mydomain.local/htdocs/caldav.php/username/calendar/ 
[OK]
[Fri May 22 15:50:54.720025 2015] [rewrite:trace2] [pid 69540:tid 
34540184576] mod_rewrite.c(475): [client 192.168.10.233:57666] 
192.168.10.233 - - 
[calendar.username.davical.hostname.mydomain.local/sid#802a19438][rid#80b0fc0a0/initial] 
init rewrite engine with requested uri /
[Fri May 22 15:50:54.720082 2015] [rewrite:trace1] [pid 69540:tid 
34540184576] mod_rewrite.c(475): [client 192.168.10.233:57666] 
192.168.10.233 - - 
[calendar.username.davical.hostname.mydomain.local/sid#802a19438][rid#80b0fc0a0/initial] 
pass through /
[Fri May 22 15:50:54.720640 2015] [rewrite:trace3] [pid 69540:tid 
34540184576] mod_rewrite.c(475): [client 192.168.10.233:57666] 
192.168.10.233 - - 
[calendar.username.davical.hostname.mydomain.local/sid#802a19438][rid#80b0fc0a0/initial] 
[perdir *If/] applying pattern '^(.*)$' to uri 
'/usr/local/www/davical.hostname.mydomain.local/sites/'
[Fri May 22 15:50:54.720695 2015] [rewrite:trace2] [pid 69540:tid 
34540184576] mod_rewrite.c(475): [client 192.168.10.233:57666] 
192.168.10.233 - - 
[calendar.username.davical.hostname.mydomain.local/sid#802a19438][rid#80b0fc0a0/initial] 
[perdir *If/] rewrite 
'/usr/local/www/davical.hostname.mydomain.local/sites/' -> 
'https://davical.hostname.mydomain.local/htdocs/caldav.php/username/calendar/'
[Fri May 22 15:50:54.720721 2015] [rewrite:trace2] [pid 69540:tid 
34540184576] mod_rewrite.c(475): [client 192.168.10.233:57666] 
192.168.10.233 - - 
[calendar.username.davical.hostname.mydomain.local/sid#802a19438][rid#80b0fc0a0/initial] 
[perdir *If/] escaped URI in per-dir context for proxy, 
https://davical.hostname.mydomain.local/htdocs/caldav.php/username/calendar/ 
-> 
https://davical.hostname.mydomain.local/htdocs/caldav.php/username/calendar/
[Fri May 22 15:50:54.720738 2015] [rewrite:trace2] [pid 69540:tid 
34540184576] mod_rewrite.c(475): [client 192.168.10.233:57666] 
192.168.10.233 - - 
[calendar.username.davical.hostname.mydomain.local/sid#802a19438][rid#80b0fc0a0/initial] 
[perdir *If/] forcing proxy-throughput with 
https://davical.hostname.mydomain.local/htdocs/caldav.php/username/calendar/
[Fri May 22 15:50:54.720755 2015] [rewrite:trace1] [pid 69540:tid 
34540184576] mod_rewrite.c(475): [client 192.168.10.233:57666] 
192.168.10.233 - - 
[calendar.username.davical.hostname.mydomain.local/sid#802a19438][rid#80b0fc0a0/initial] 
[perdir *If/] go-ahead with proxy request 
proxy:https://davical.hostname.mydomain.local/htdocs/caldav.php/username/calendar/ 
[OK]
[Fri May 22 15:50:54.720828 2015] [rewrite:trace2] [pid 69540:tid 
34540184576] mod_rewrite.c(475): [client 192.168.10.233:57666] 
192.168.10.233 - - 
[calendar.username.davical.hostname.mydomain.local/sid#802a19438][rid#80b17f0a0/subreq] 
init rewrite engine with requested uri /index.html
[Fri May 22 15:50:54.720847 2015] [rewrite:trace1] [pid 69540:tid 
34540184576] mod_rewrite.c(475): [client 192.168.10.233:57666] 
192.168.10.233 - - 
[calendar.username.davical.hostname.mydomain.local/sid#802a19438][rid#80b17f0a0/subreq] 
pass through /index.html
[Fri May 22 15:50:54.721113 2015] [rewrite:trace3] [pid 69540:tid 
34540184576] mod_rewrite.c(475): [client 192.168.10.233:57666] 
192.168.10.233 - - 
[calendar.username.davical.hostname.mydomain.local/sid#802a19438][rid#80b17f0a0/subreq] 
[perdir *If/] applying pattern '^(.*)$' to uri 
'/usr/local/www/davical.hostname.mydomain.local/sites/index.html'
[Fri May 22 15:50:54.721165 2015] [rewrite:trace2] [pid 69540:tid 
34540184576] mod_rewrite.c(475): [client 192.168.10.233:57666] 
192.168.10.233 - - 
[calendar.username.davical.hostname.mydomain.local/sid#802a19438][rid#80b17f0a0/subreq] 
[perdir *If/] rewrite 
'/usr/local/www/davical.hostname.mydomain.local/sites/index.html' -> 
'https://davical.hostname.mydomain.local/htdocs/caldav.php/username/calendar/'
[Fri May 22 15:50:54.721210 2015] [rewrite:trace2] [pid 69540:tid 
34540184576] mod_rewrite.c(475): [client 192.168.10.233:57666] 
192.168.10.233 - - 
[calendar.username.davical.hostname.mydomain.local/sid#802a19438][rid#80b17f0a0/subreq] 
[perdir *If/] escaped URI in per-dir context for proxy, 
https://davical.hostname.mydomain.local/htdocs/caldav.php/username/calendar/ 
-> 
https://davical.hostname.mydomain.local/htdocs/caldav.php/username/calendar/
[Fri May 22 15:50:54.721227 2015] [rewrite:trace2] [pid 69540:tid 
34540184576] mod_rewrite.c(475): [client 192.168.10.233:57666] 
192.168.10.233 - - 
[calendar.username.davical.hostname.mydomain.local/sid#802a19438][rid#80b17f0a0/subreq] 
[perdir *If/] forcing proxy-throughput with 
https://davical.hostname.mydomain.local/htdocs/caldav.php/username/calendar/
[Fri May 22 15:50:54.721243 2015] [rewrite:trace1] [pid 69540:tid 
34540184576] mod_rewrite.c(475): [client 192.168.10.233:57666] 
192.168.10.233 - - 
[calendar.username.davical.hostname.mydomain.local/sid#802a19438][rid#80b17f0a0/subreq] 
[perdir *If/] go-ahead with proxy request 
proxy:https://davical.hostname.mydomain.local/htdocs/caldav.php/username/calendar/ 
[OK]



And this is after I deleted an appointment from the calendar through 
Thunderbird.


[Fri May 22 15:55:10.493019 2015] [rewrite:trace2] [pid 80493:tid 
34540184576] mod_rewrite.c(475): [client 192.168.10.233:57691] 
192.168.10.233 - - 
[calendar.username.davical.hostname.mydomain.local/sid#802a19438][rid#80b03e0a0/initial] 
init rewrite engine with requested uri 
/f64399b7-54e4-ea4b-81aa-8bcb9765b21e.ics
[Fri May 22 15:55:10.493101 2015] [rewrite:trace1] [pid 80493:tid 
34540184576] mod_rewrite.c(475): [client 192.168.10.233:57691] 
192.168.10.233 - - 
[calendar.username.davical.hostname.mydomain.local/sid#802a19438][rid#80b03e0a0/initial] 
pass through /f64399b7-54e4-ea4b-81aa-8bcb9765b21e.ics
[Fri May 22 15:55:10.493656 2015] [rewrite:trace3] [pid 80493:tid 
34540184576] mod_rewrite.c(475): [client 192.168.10.233:57691] 
192.168.10.233 - - 
[calendar.username.davical.hostname.mydomain.local/sid#802a19438][rid#80b03e0a0/initial] 
[perdir *If/] applying pattern '^(.*)$' to uri 
'/usr/local/www/davical.hostname.mydomain.local/sites/f64399b7-54e4-ea4b-81aa-8bcb9765b21e.ics'
[Fri May 22 15:55:10.493710 2015] [rewrite:trace2] [pid 80493:tid 
34540184576] mod_rewrite.c(475): [client 192.168.10.233:57691] 
192.168.10.233 - - 
[calendar.username.davical.hostname.mydomain.local/sid#802a19438][rid#80b03e0a0/initial] 
[perdir *If/] rewrite 
'/usr/local/www/davical.hostname.mydomain.local/sites/f64399b7-54e4-ea4b-81aa-8bcb9765b21e.ics'

-> 
'https://davical.hostname.mydomain.local/htdocs/caldav.php/username/calendar/'
[Fri May 22 15:55:10.493736 2015] [rewrite:trace2] [pid 80493:tid 
34540184576] mod_rewrite.c(475): [client 192.168.10.233:57691] 
192.168.10.233 - - 
[calendar.username.davical.hostname.mydomain.local/sid#802a19438][rid#80b03e0a0/initial] 
[perdir *If/] escaped URI in per-dir context for proxy, 
https://davical.hostname.mydomain.local/htdocs/caldav.php/username/calendar/ 
-> 
https://davical.hostname.mydomain.local/htdocs/caldav.php/username/calendar/
[Fri May 22 15:55:10.493752 2015] [rewrite:trace2] [pid 80493:tid 
34540184576] mod_rewrite.c(475): [client 192.168.10.233:57691] 
192.168.10.233 - - 
[calendar.username.davical.hostname.mydomain.local/sid#802a19438][rid#80b03e0a0/initial] 
[perdir *If/] forcing proxy-throughput with 
https://davical.hostname.mydomain.local/htdocs/caldav.php/username/calendar/
[Fri May 22 15:55:10.493768 2015] [rewrite:trace1] [pid 80493:tid 
34540184576] mod_rewrite.c(475): [client 192.168.10.233:57691] 
192.168.10.233 - - 
[calendar.username.davical.hostname.mydomain.local/sid#802a19438][rid#80b03e0a0/initial] 
[perdir *If/] go-ahead with proxy request 
proxy:https://davical.hostname.mydomain.local/htdocs/caldav.php/username/calendar/ 
[OK]
[Fri May 22 15:55:11.064046 2015] [fcgid:warn] [pid 80494:tid 
34540184576] [client 192.168.50.101:38438] mod_fcgid: stderr: davical: 
LOG: :Response status 405 for PUT /htdocs/caldav.php/username/calendar/
[Fri May 22 15:55:11.064155 2015] [fcgid:warn] [pid 80494:tid 
34540184576] [client 192.168.50.101:38438] mod_fcgid: stderr: davical: 
LOG: :***************** Response Header ****************
[Fri May 22 15:55:11.064168 2015] [fcgid:warn] [pid 80494:tid 
34540184576] [client 192.168.50.101:38438] mod_fcgid: stderr: davical: 
LOG: headers:-->Server: 1.1
[Fri May 22 15:55:11.064179 2015] [fcgid:warn] [pid 80494:tid 
34540184576] [client 192.168.50.101:38438] mod_fcgid: stderr: davical: 
LOG: headers:-->DAV: 1, 2, 3, access-control, calendar-access, 
calendar-schedule
[Fri May 22 15:55:11.064190 2015] [fcgid:warn] [pid 80494:tid 
34540184576] [client 192.168.50.101:38438] mod_fcgid: stderr: davical: 
LOG: headers:-->DAV: extended-mkcol, bind, addressbook, 
calendar-auto-schedule, calendar-proxy
[Fri May 22 15:55:11.064200 2015] [fcgid:warn] [pid 80494:tid 
34540184576] [client 192.168.50.101:38438] mod_fcgid: stderr: davical: 
LOG: headers:-->X-DAViCal-Version: DAViCal/1.1.2; DB/1.2.11
[Fri May 22 15:55:11.064211 2015] [fcgid:warn] [pid 80494:tid 
34540184576] [client 192.168.50.101:38438] mod_fcgid: stderr: davical: 
LOG: headers:-->Content-type: text/plain; charset="utf-8"
[Fri May 22 15:55:11.064221 2015] [fcgid:warn] [pid 80494:tid 
34540184576] [client 192.168.50.101:38438] mod_fcgid: stderr: davical: 
LOG: :******************** Response ********************
[Fri May 22 15:55:11.064267 2015] [fcgid:warn] [pid 80494:tid 
34540184576] [client 192.168.50.101:38438] mod_fcgid: stderr: davical: 
LOG: response:-->



Best regards
Leander

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message