Hello Friends !!
WebDAV is Web-based Distributed Authoring and Versioning. Mostly we have many web developers and programmers working on the same site, with access to some particular folder in the web development server. There are a lot of way that we can used to manage remote file and doing web publishing in the same time like FTP, Samba etc and many other sharing protocol.
The best thing about WebDAV is it allow for file locking if someone is editing the file. It is suitable with my environment and I need to deliver this via our web server (Apache). Variables as below:
OS: CentOS 5.6
Web server: Apache 2.2.3
Web root: /home/sahil/public_html
WebDAV user1: sahil
WebDAV password: sahilweb
WebDAV user2: faiz
WebDAV password: faizweb
Install Apache via yum:-
# yum install httpd* -y
Install php and mysql:-
# yum install php* mysql* -y
Start MySQL and Apache service and Enable in start-up:-
#service mysqld start
#service httpd start
#chkconfig httpd on #chkconfig mysqld on Stop Iptable and Selinux and Disable in start-up:- #iptables -F #service iptables stop #chkconfig iptables off #setenforce 0 Lets Do some changes in configuration file of apache:- #vim /etc/httpd/conf/httpd.conf <VirtualHost *:80> ServerAdmin web.sahil.com DocumentRoot /home/sahil/public_html ServerName sahil.com ErrorLog logs/sahil.com-error_log CustomLog logs/sahil.com-access_log common Alias /sahil /home/sahil/public_html <Location /> DAV On AuthType Digest AuthName "WebDAV_Authentication" AuthUserFile /home/webtest/digest-password Require valid-user </Location> </VirtualHost> DAVLockDB /tmp/DAVLock DAVMinTimeout 600 :wq!
Save & Quit
Note :- I have created below personal code:-
#vim /home/sahil/public_html/index.html
<!DOCTYPE html>
<html>
<body>
<h3>Please Dont Move We hacked Your PC</h3>
<p>
<img src=”http://i0.tagstat.com/tags7/0dj/0djL_y18p.gif” />
A Moving image:
<img src=”http://www.w3schools.com/html/hackanm.gif” alt=”Smiley face” width=”32″ height=”32″ />
</p>
<h2>Please keep Smiling</h2>
<p>
An image:
<img src=”http://www.w3schools.com/html/smiley.gif” alt=”Computer man” width=”48″ height=”48″ />
</p>
<h1>Ha ha ha ha ha ha</h1>
<img src=”https://fbcdn-sphotos-e-a.akamaihd.net/hphotos-ak-snc7/s720x720/425379_390643270993862_1486767189_n.jpg”/>
<p>
Please click:
<img src=”http://www.htmlgoodies.com/img/homepage.gif” />
</p>
<img src=”http://www.tagged.com/profile.html?uid=5969927012″ />
<img src=”https://mail-attachment.googleusercontent.com/attachment/?ui=2&ik=2709121879&view=att&th=139e3148fbc591e6&attid=0.1&disp=inline&realattid=f_h7bo4v870&safe=1&zw&saduie=AG9B_P-tY0U257T4DPJ_556c5lH2&sadet=1348801306037&sads=-VIjPhhFhDZ3BILAC535EK5wNVQ&sadssc=1″ />
</body>
</html>
:wq!
Save & Quit
Now Restart the apache service:-
#service httpd restart
Now we will give the password for user authentication:-
#htdigest /home/sahil/digest-password WebDAV_Authentication sahil Adding password for sahil in realm WebDAV_Authentication. New password: Re-type new password: give the user name and password for authentication Here user is sahil.You can add more user name and pass same as above. Check user database file after adding users: Its show like:- #cat /home/ipmart/digest-password sahil:WebDAV_Authentication:8f8b04a66ca86ac6524e59fead98 faiz:WebDAV_Authentication:a5874504ddt14b08ad38c7cd846c5dda Restart the apache :- #service httpd restart Open you Browser http://192.168.1.10/sahil Shahil Enjoysahil.jet786@gmail.com Just Love Linux
thanks very much this is very helpful blog ..
keep it up
Thank You !! Mr. Surya..