Forums / General / eZ publish & webDAV listening to same port

eZ publish & webDAV listening to same port

Author Message

Abdul Rasheed

Wednesday 27 May 2009 4:06:55 am

Hi All,

Environment:
OS : Windows Xp SP3
Apache : 1.3.41
PHP : 5.2.9
MySQL : 5.1.34

I am new to eZ publish, I have a bottle neck situation. I have done the eZ publish installation and its working fine, also I have configured webDAV (IE as client) . So it is known that eZ publish listen to port 80 of apache, so as webDAV is configured to listen to <b>port 80</b>. Henceforth am not able to access both the eZ publish site and the webDAV folder structure.

webDAV config in httpd.conf file,

NameVirtualHost *:80

<VirtualHost *:80>
   <Directory C:/Apache/htdocs/cms>  #eZ publish installation directory   
    Options FollowSymLinks Indexes ExecCGI
    AllowOverride None
  </Directory>
   DocumentRoot C:/Apache/htdocs/cms #eZ publish installation directory
   RewriteEngine On
   RewriteRule . /webdav.php
   ServerAdmin admin@localhost.com
   ServerName site1
</VirtualHost>

Hope am clear about my problem, any suggestion will be of great help.

Regards,
Abdul Rasheed

Gaetano Giunta

Wednesday 27 May 2009 4:17:55 am

I am sure you already thought about it, but why not using a different IP address for webdav?
Adding a virtual IP to an existing server is a very simple operation on both linux and windows.

Principal Consultant International Business
Member of the Community Project Board

Christian Rößler

Wednesday 27 May 2009 7:15:46 am

Hy,

this is my (example) apache configuration:

NameVirtualHost *:80

<VirtualHost *:80>
  ServerName example.com
  ServerAlias *.example.com

  ServerAdmin admin@localhost.com
  DocumentRoot /path/to/ezpublish

  <Directory /path/to/ezpublish>
   Options FollowSymLinks Indexes
   AllowOverride All
 </Directory>
</VirtualHost>

And this is the (extract) .htaccess:

RewriteEngine On

#    example.com/webdav
RewriteCond %{REQUEST_URI} ^webdav
RewriteRule (.*) webdav.php [L]

#    webdav.example.com
#RewriteCond %{HTTP_HOST} ^webdav
#RewriteRule (.*) webdav.php [L]

as you can see, i am able to call the webdav-interface either via

example.com/webdav

or

webdav.example.com

Both situations require to enable webdav in ezPublish-settings (see webdav.ini).
When calling both sites with an webdav-client, i get the siteaccesses listed. When entering a siteaccess i am requested for a password.

in short: it works.
Using apache on windows makes no difference.

Chris

EDIT:

forgot to metion that the site is available via <i>http://example.com</i>, <i>www.example.com</i> and webdav is 'listening' on <i>webdav.example.com</i>...

Hannover, Germany
eZ-Certified http://auth.ez.no/certification/verify/395613

zurgutt -

Thursday 28 May 2009 1:50:07 am

Do you mean you want to use eZ webdav?

I have these rules for url_rewrite in my virtualhost. Notice 2 lines with webdav, it makes it so that if you use webdav.something .xx for hostname, it will call webdav script.

<IfModule mod_rewrite.c>
RewriteEngine On
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]
RewriteRule .* /index.php
RewriteCond %{HTTP_HOST} ^webdav\..*
RewriteRule ^(.*) /webdav.php [L]
</IfModule>

Certified eZ developer looking for projects.
zurgutt at gg.ee

Abdul Rasheed

Thursday 28 May 2009 3:30:35 am

Thanks all for your replies, the issue is solved, I added this code in the http.conf file

NameVirtualHost *:80    
<VirtualHost *:80> 
<Directory C:/Apache/htdocs/cms> #eZ publish installation directory      
Options FollowSymLinks Indexes ExecCGI   
AllowOverride None   </Directory>  
DocumentRoot C:/Apache/htdocs/cms #eZ publish installation directory   
RewriteEngine On    
RewriteRule . /webdav.php    
ServerAdmin admin@localhost.com   
ServerName site1  
</VirtualHost>  
<VirtualHost *:80> 
<Directory C:/Apache/htdocs>
DocumentRoot C:/Apache/htdocs
ServerAdmin admin@localhost.com   
ServerName site2 
</VirtualHost>  

#############
config in sys32/etc/hosts

system IP site1
system IP site2

well that worked and one important thing is that, the entries given in the host file of the server should also be added in the client machine's host file.

Thanks again for your help guys.
eZ rocks.

Regards,
Abdul Rasheed