enabling webdav in 3.8.2

Author Message

Sorin Sbarnea

Thursday 03 August 2006 9:36:12 am

I want to make a full test of ezpublish and I didn't managed to make webdav feature working after almost 3 days.

My current configuration is Apache 2.2.x with PHP 4.4.2 runing as module and postgres 8.1 (there are still charset problems with ez+mysql)

I'm very upset that the documentation is very incomplete - it's more like a presention and you have to search a lot for finding info. There are LOTS of .htaccess files but none has ever tried to put a good one in documentation and remove the wrong ones.

<b>apache conf</b>

<VirtualHost *:81>
    ServerName support.mysite.com
    ServerAlias soap.mysite.com
    ServerAlias webdav.mysite.com    

    CustomLog logs/support_access.log combined
    ErrorLog logs/support_error.log

    LogLevel debug

    DocumentRoot /home/httpd/html/ro.intersol/support

    DirectoryIndex index.php
    
    <Files ~ "\.php$">
		AcceptPathInfo On
    </Files>

    <Directory "/home/httpd/html/ro.intersol/support/">
    	Options +Indexes +FollowSymLinks +ExecCGI
		AllowOverride None
    </Directory>


	<FilesMatch "(index\.php|\.(gif|jpe?g|png|css|js|html)|var(.+)storage.pdf(.+)\.pdf)$">
		order allow,deny
		allow from all
	</FilesMatch>

    <IfModule mod_php4.c>
        php_admin_flag safe_mode Off
        php_admin_value register_globals 0
        php_value magic_quotes_gpc 0
        php_value magic_quotes_runtime 0
        php_value allow_call_time_pass_reference 0
	php_value session.auto_start 0
    </IfModule>

	<IfModule mod_rewrite.c>
    	RewriteEngine On

		RewriteCond %{HTTP_HOST} ^webdav\..*
		RewriteRule ^(.*) webdav.php [L]
 
		RewriteCond %{HTTP_HOST} ^soap\..*
		RewriteRule ^(.*) soap.php [L]
 
    </IfModule>

</VirtualHost>

<b>Cadaver test: fail</b> - bad request

# cadaver http://webdav.mydomain.com:81/
Could not open collection:
400 Bad Request
dav:/?

<b>DAV Explorer test : fail</b> - Bad request

========= Outbound Message =========
OPTIONS / HTTP/1.1
Host: webdav.mysite.com:81
Connection: TE
TE: trailers, deflate, gzip, compress
User-Agent: UCI DAV Explorer/0.91 RPT-HTTPClient/0.3-3E
Translate: f
Accept-Encoding: deflate, gzip, x-gzip, compress, x-compress


========= Inbound Message =========
HTTP/1.1 400 Bad Request
Date: Thu, 03 Aug 2006 16:30:32 GMT
Server: Apache/2.2.2 (Fedora) DAV/2 mod_auth_kerb/5.0-rc6 mod_scgi/1.9 PHP/4.4.2 mod_python/3.2.8 Python/2.4.3 SVN/1.3.2 mod_perl/2.0.2 Perl/v5.8.8
Content-Length: 226
Connection: close
Content-Type: text/html; charset=iso-8859-1

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>400 Bad Request</title>
</head><body>
<h1>Bad Request</h1>
<p>Your browser sent a request that this server could not understand.<br />
</p>
</body></html>

WebDav module is enabled and webdav log is enabled but there is nothing in the log ($ezhome/var/log/webdav.log).

Kristof Coomans

Thursday 03 August 2006 11:43:22 pm

Did you take a look in the Apache access logs?

If denying access is the default, then I guess you do not have access to webdav.php. The pattern does not include webdav.php:

<FilesMatch "(index\.php|\.(gif|jpe?g|png|css|js|html)|var(.+)storage.pdf(.+)\.pdf)$">
    order allow,deny
    allow from all
</FilesMatch>

independent eZ Publish developer and service provider | http://blog.coomanskristof.be | http://ezpedia.org

Sorin Sbarnea

Monday 07 August 2006 5:11:42 am

The problem is not from the access rights. "Bad Request" it's not a deny.

The only additional info I have right now is that in the apache log I can see:

 [07/Aug/2006:14:59:03 +0300] "OPTIONS / HTTP/1.1" 400 226 "-" "UCI DAV Explorer/0.91 RPT-HTTPClient/0.3-3E"

There is nothing in error log even with <i>LogLevel debug</i>.

Kristof Coomans

Monday 07 August 2006 10:31:55 am

Make sure your webserver has write permissions to $ezroot/var/ and anything beneath it.

Enable WebDAV logging in settings/override/webdav.ini.append(.php):

[GeneralSettings]
Logging=enabled

Now take a look in the webdav.log file under var/log and var/<i>siteaccess</i>/log

independent eZ Publish developer and service provider | http://blog.coomanskristof.be | http://ezpedia.org

Sorin Sbarnea

Monday 07 August 2006 11:08:05 am

I've separated the www.mysite.com and webdav.mysite.com in two virtual hosts. The www is working quite well (the site name is 'web') and can be contacted using something like http://www.mysite.com:81/index.php/web/ (root is working too).

About webdav virtual host: (http://webdav.mysite.com:81/ )
- opening in firefox will display a blank page (no error)
- opeing in DAV Explorer gives an error like: ACL Interpreter: "The server does not support DAV at Resource /" logs:

========= Outbound Message =========
OPTIONS / HTTP/1.1
Host: webdav.intersol.ro:81
Connection: TE
TE: trailers, deflate, gzip, compress
User-Agent: UCI DAV Explorer/0.91 RPT-HTTPClient/0.3-3E
Translate: f
Accept-Encoding: deflate, gzip, x-gzip, compress, x-compress


========= Inbound Message =========
HTTP/1.1 200 OK
Date: Mon, 07 Aug 2006 17:52:13 GMT
Server: Apache/2.2.2 (Fedora) DAV/2 mod_auth_kerb/5.0-rc6 mod_scgi/1.9 PHP/4.4.2 mod_python/3.2.8 Python/2.4.3 SVN/1.3.2 mod_perl/2.0.2 Perl/v5.8.8
Allow: GET,HEAD,POST,OPTIONS,TRACE
Content-Length: 0
Content-Type: application/x-httpd-php

At the same time nothing added to $ez$/var/log/webdav.log
In the mod_rewrite log:

 (2) init rewrite engine with requested uri /
 (3) applying pattern '\.(css|jar|js|html|php)$' to uri '/'
 (2) rewrite '/' -> '/home/httpd/html/ro.intersol/support/webdav.php'
 (2) local path result: /home/httpd/html/ro.intersol/support/webdav.php
 (1) go-ahead with /home/httpd/html/ro.intersol/support/webdav.php [OK]

And in httpd log:

217.156.79.121 - - [07/Aug/2006:20:54:59 +0300] "OPTIONS / HTTP/1.1" 200 - "-" "UCI DAV Explorer/0.91 RPT-HTTPClient/0.3-3E"

Tries with different endings but none seams to work.

Also i've tried to open the url as webfolder with Internet Explorer 7 Beta 3 and apache log shows me several requested files (starting with _cti_inf.html) and strange after this it opens an information message box with no title and no text: options yes/no. If i press no it will cancel the opening and if i press yes i get an 404.

I'm pretty sure that after i finish this endless webdav configuration i will rewrite the webdav install documentation of ez publish :|

Kristof Coomans

Tuesday 08 August 2006 12:06:27 am

Can you show us the exact configuration of your WebDAV virtual host?

We have something like this for Apache 2.0.x:

<VirtualHost IP:PORT>
    DocumentRoot EZROOTDIR

    <Directory EZROOTDIR>
       Options FollowSymlinks
       AllowOverride None
    </Directory>

    <IfModule mod_rewrite.c>
        RewriteEngine On
        RewriteRule ^(.*) /webdav.php [L]
    </IfModule>
</VirtualHost>

independent eZ Publish developer and service provider | http://blog.coomanskristof.be | http://ezpedia.org

Sorin Sbarnea

Tuesday 08 August 2006 2:37:44 am

I've followed all infos and still no result. I've have made some symlinks of all implied config files. You can see them at http://play.intersol.ro/ez/

The url of the webdav should be: http://webdav.intersol.ro:81 and the site at http://support.intersol.ro:81 <i>Don't forget that all ez sites are running on port 81 with apache 2.2.x, php 4.4.x running as module</i>

Sorin Sbarnea

Thursday 10 August 2006 2:20:43 am

Too much time spent on this problem. I'm going to try Plone even if I don't like Python. it seams that I could get webdav and OpenDocument support from it too.

Kristof Coomans

Thursday 10 August 2006 4:50:28 am

Apache 2.2.x? Maybe that could be the problem...

independent eZ Publish developer and service provider | http://blog.coomanskristof.be | http://ezpedia.org

Sorin Sbarnea

Friday 11 August 2006 2:48:57 am

Sorry but i spent too much time on installing "ez publish", there are too many requirements for ancient products. It seams that it <i>could</i> work in a server thats running the 2 years software.

Currently the releases are:
- Apache 2.2 (maybe not supported)
- PHP 5.1 (not supported)
- MySQL 5.1 (not supported or at least you need to recompile the PHP in order to make it work) - but it seamns that is working with lastes PostgreSQL :)

I've spent around 10 days in order to install two copies of PHP make httpd run in two instances one for php4 and one for php5. I don't want to install another copy of apache on my server just to see if it could work.

Maybe I'l try the 4.x version when it will be available IF it will be compatible with the current release of it's requirements.

Kristof Coomans

Friday 11 August 2006 4:46:16 am

You're right about PHP 5 :-)

But MySQL 5.1 can be used, but you have to let it use old password hashes. And I wouldn't call Apache 2.0 an ancient product, I think it's still used on most webservers.

independent eZ Publish developer and service provider | http://blog.coomanskristof.be | http://ezpedia.org

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.