Saturday, October 11, 2014


Apache Webdav Configuration in Window or Linux


  1. Download Apache Server :httpd-2.4.10-win64(https://www.apachelounge.com/download/win64/) 
  2.  Unzip the downloaded file .  
  3.  Copy the folder Apache24 into your preferred location. 
  4.   Load Web Dav in Apache Server 
  5.  Edit “%APACHE_PATH%/conf/httpd.conf“, uncomment the following load and include           statements.
            File : httpd.conf
            LoadModule alias_module modules/mod_alias.so
            LoadModule auth_digest_module modules/mod_auth_digest.so
            LoadModule authn_file_module modules/mod_authn_file.so
            LoadModule dav_module modules/mod_dav.so
            LoadModule dav_fs_module modules/mod_dav_fs.so
            LoadModule dav_lock_module modules/mod_dav_lock.so
            LoadModule setenvif_module modules/mod_setenvif.so
            Include conf/extra/httpd-dav.conf



       6.      Create User & Password for WebDAV

            For WebDAV authentication access, issue this command :
            htpasswd -c "%APACHE_INSTALLED_PATH%/users.passwd" administrator
            See sample output :
            %APACHE_INSTALLED_PATH%\bin>htpasswd -c                                                                  "%APACHE_PATH%/users.passwd" administrator
            Adding password for administrator in realm Users.
            New password: ********
            Re-type new password: ********
           
            It means, create an user “administrator” with password “given by user” and stored it               in file – “%APACHE_INSTALLED_PATH%/users.passwd“.

       7.   Configure WebDAV folder

            Created a “data” folder under “%APACHE_PATH%/data“. Edit                                                 “%APACHE_PATH%/extra/httpd-dav.conf” , add following content :


             Go To File : httpd-dav.conf configure the following

                Alias /data "%APACHE_PATH%/data"
                <Directory "%APACHE_PATH%/data">
                Dav On
                AuthType Basic 
                AuthName "Users"
                Options Indexes
                AuthUserFile "%APACHE_PATH%/users.passwd"
                AuthDigestProvider file
                # Allow universal read-access, but writes are restricted
                # to the admin user.
            
                <Limit GET OPTIONS PROPFIND>
                require user administrator
                </Limit>
                </Directory>
          
               It means enable the WebDAV access for “data” folder, and use “users.passwd” file                for authentication.

               Note : AuthType can be any of the following Basic(default),Digest,Windows.

      8.  Restart Apache Server

            Done, restart Apache server service. Now, WebDAV service is enabled in your                     server’s  “data” folder.
            For example
            If your server ip is 127.0.0.1, then you can WebDAV access your “data” folder via             this URL : “http://127.0.0.1/data”


       9.    Verify with WebDAV Client

            Download and install bitkinex, a powerful free WebDAV client for Windows.

            OR

            Browser(http://127.0.0.1/data--->Enter Username & Password).

           OR

            Windows Explorer
             Go To Computer ----->Right Click ---->Add Network location--->Enter location                         (http://hostname/data) ----->Enter Username & Password.
            
          Note: To map network drive you need to have windows desktop feature enable for                          some operating systems like 2008,2008 R2 servers.



     
    



No comments:

Post a Comment