Forums / Developer / eZpublish 4 and WebDAV - Doesn't work

eZpublish 4 and WebDAV - Doesn't work

Author Message

Salvatore Guarino

Wednesday 23 April 2008 5:46:13 am

Hi,

I'm trying to enable webdvav on a test environment with eZpublish 4.0.

According to the documentation, I followed these steps:

1. I created a file "webdav.ini.append.php" in settings/override, this is the content:

<?php /* #?ini charset="utf-8"?

[GeneralSettings]
EnableWebDAV=true
*/ ?>

2. I checked the file site.ini.append in settings/override, it seem ok, this is the content:

<?php /* #?ini charset="utf-8"?

[ExtensionSettings]
ActiveExtensions[]
ActiveExtensions[]=ezwebin
ActiveExtensions[]=ezdhtml
ActiveExtensions[]=ezodf

[Session]
SessionNameHandler=custom

[SiteSettings]
DefaultAccess=ita
SiteList[]
SiteList[]=mysite
SiteList[]=ita
SiteList[]=ger
SiteList[]=eng
SiteList[]=fre
SiteList[]=mysite_admin
RootNodeDepth=1

[UserSettings]
LogoutRedirect=/

[SiteAccessSettings]
CheckValidity=false
AvailableSiteAccessList[]
AvailableSiteAccessList[]=mysite
AvailableSiteAccessList[]=ita
AvailableSiteAccessList[]=ger
AvailableSiteAccessList[]=eng
AvailableSiteAccessList[]=fre
AvailableSiteAccessList[]=mysite_admin
MatchOrder=uri
HostMatchMapItems[]

[FileSettings]
VarDir=var/ezwebin_site

[MailSettings]
Transport=sendmail
[email protected]
EmailSender=

[EmbedViewModeSettings]
AvailableViewModes[]
AvailableViewModes[]=embed
AvailableViewModes[]=embed-inline
InlineViewModes[]
InlineViewModes[]=embed-inline
*/ ?>

3. I edited the vhost config file, adding

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

and

webdav.mysite.com

Thi is the complete content:

<VirtualHost *>
ServerName www2.mysite.com
ServerAlias www2.mysite.it www2.mysite.com www2.mysite.eu webdav.mysite.com
ErrorLog /var/log/apache2/www.mysite.com/error_log
CustomLog /var/log/apache2/www.mysite.com/access_log combined
DocumentRoot "/var/www/www.mysite.com"

    <Directory "/var/www/www.mysite.com">
        Options FollowSymLinks
        AllowOverride None
        Order allow,deny
        Allow from all
    </Directory>
	
    <IfModule peruser.c>
        ServerEnvironment apache apache
        MinSpareProcessors 4
        MaxProcessors 20
    </IfModule>	
	<IfModule mod_php5.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
    </IfModule>

    DirectoryIndex index.php
 
    <IfModule mod_rewrite.c>
        RewriteEngine On
        RewriteRule content/treemenu/?$ /index_treemenu.php [L]
        RewriteRule ^/var/storage/.* - [L]
        RewriteRule ^/var/[^/]+/storage/.* - [L]
        RewriteRule ^/var/cache/texttoimage/.* - [L]
        RewriteRule ^/var/[^/]+/cache/texttoimage/.* - [L]
        RewriteRule ^/design/[^/]+/(stylesheets|images|javascript)/.* - [L]
        RewriteRule ^/share/icons/.* - [L]
        RewriteRule ^/extension/[^/]+/design/[^/]+/(stylesheets|images|javascripts?)/.* - [L]
        RewriteRule ^/packages/styles/.+/(stylesheets|images|javascript)/[^/]+/.* - [L]
        RewriteRule ^/packages/styles/.+/thumbnail/.* - [L]
        RewriteRule ^/favicon\.ico - [L]
        RewriteRule ^/robots\.txt - [L]
        # Uncomment the following lines when using popup style debug.
        # RewriteRule ^/var/cache/debug\.html.* - [L]
        # RewriteRule ^/var/[^/]+/cache/debug\.html.* - [L]
		RewriteCond %{HTTP_HOST} ^webdav\..*
		RewriteRule ^(.*) /webdav.php [L]
        RewriteRule .* /index.php
    </IfModule>
	
</VirtualHost>

It doesn't work. I treid with explorer in win xp, windows vista and in dreamweaver. There aren't error in the apache log.

Any idea?

Thx and bye

Kristof Coomans

Wednesday 23 April 2008 7:40:14 am

Hi Salvatore

What exactly is "it doesn't work"? I presume you have a working DNS entry for webdav.mysite.com or added it to your operating system's hosts file?

I also recommend you putting

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

right after RewriteEngine On.

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

Salvatore Guarino

Thursday 24 April 2008 2:26:19 am

Thank you Kristof,

yes, I have an host in my DNS for webdav.mysite.com. I tried putting the rules after RewriteEngine On, but when I try to connect using win xp (I know that I have to create a special web folder connection, not simply using ie), the folder is empty, I cannot see any structure, and I cannot upload images or files...

Salvatore Guarino

Thursday 24 April 2008 2:46:39 am

I suspect that problem is in the Windows xp webdav client... I will try with a Linux host, and I will post the result...