Enabling WebDAV On Fedora 16

Logo for the Apache HTTPD Server Project .

Image via Wikipedia

Here is how I enabled WebDAV on Fedora 16 (before starting, you need to know how to use a terminal/shell and change into root account from terminal/shell):

  1. I opened up ports 80 and 443 for the firewall
  2. I disabled SELinux
    1. Open up the file vi /etc/sysconfig/selinux by typing in the command vi /etc/sysconfig/selinux as root inside a terminal
    2. Change the line that says SELINUX=enforcing to SELINUX=disabled
    3. Save the /etc/sysconfig/selinux file and get out of vi
    4. Reboot the machine
  3. I installed Apache Web Server
    1. Inside a terminal as root, type in the command yum -y install httpd
    2. Edit the file vi /etc/httpd/conf/httpd.conf by typing in the command vi /etc/httpd/conf/httpd.conf inside a terminal as root user
    3. Change line #43 to ServerTokens Prod
    4. Change line #75 to KeepAlive On
    5. Change line #261 to root@localhost
    6. Change line #275 to ServerName localhost:80
    7. Change line #337 to AllowOverride All
    8. Change line #401 to DirectoryIndex index.html index.php
    9. Change line #535 to ServerSignature Off
    10. Comment out the line #758 to something like this #AdDefaultCharset UTF-8
    11. Save the file /etc/httpd/conf/httpd.conf and get out of vi
    12. Type the command systemctl start httpd.service inside the terminal as root user to start Apache web server
    13. Type the command systemctl enable httpd.service to enable the starting of Apache web server on each fresh boot
    14. Install PHP by typing command yum -y install php php-mbstring php-pear inside a terminal as root user
    15. Type the command systemctl restart httpd.service inside a terminal as root user to restart Apache web server
    16. Configuring SSL for Apache to serve websites in SSL mode (i.e., HTTPS) by installing mod_ssl, so type the command yum -y install mod_ssl inside a terminal as root user
    17. Edit the file vi /etc/httpd/conf.d/ssl.conf by typing in the command vi /etc/httpd/conf.d/ssl.conf inside a terminal as root user
    18. Uncomment the line #78 to DocumentRoot “/var/www/html”
    19. Uncomment the line #79 to ServerName localhost:443
    20. Uncomment line #112 if it’s not yet uncommented, so the line should look like this SSLCertificateFile /etc/pki/tls/certs/localhost.crt
    21. Uncomment the line #119 if it’s not yet uncommented, so the line should look like this SSLCertificateKeyFile /etc/pki/tls/private/localhost.key
    22. Save the file /etc/httpd/conf.d/ssl.conf and get out of vi
    23. Type the command systemctl restart httpd.service to restart the Apache web server
  4. Create WebDAV server/protocol
    1. Inside a terminal as root user, type in the command mkdir /home/WebDAV to create a directory named WebDAV
    2. Change the owner for directory WebDAV by typing in the command chown apache. /home/WebDAV inside a terminal as root user
    3. Change permission for WebDAV directory to 770 by typing in the command chmod 770 /home/WebDAV inside a terminal as root user
    4. Make a webdav.conf file to configure WebDAV server by typing in the command vi /etc/httpd/conf.d/webdav.conf inside a terminal as root user
    5. Type the lines below into the file /etc/httpd/conf.d/webdav.conf using vi editor:
    6. Alias /share /home/WebDAV
    7. <location /share>
    8. DAV On
    9. SSLRequireSSL
    10. Options None
    11. AuthType Basic
    12. AuthName WebDAV
    13. AuthUserFile /etc/httpd/conf/.htpasswd
    14. <LimitExcept GET OPTIONS>
    15. Order allow,deny
    16. Allow from 192.168.1.
    17. Require valid-user
    18. </LimitExcept>
    19. </Location>
    20. Stop typing the stuffs into the file /etc/httpd/conf.d/webdav.conf and save it and get out of vi
    21. Type the command htpasswd -c /etc/httpd/conf/.htpasswd fedora inside a terminal as root user to add password for fedora user to use WebDAV server
    22. You will be asked to create a password and confirm password, so type in the same password twice
    23. Now you need to restart the Apache server by typing in the command systemctl restart httpd.service inside a terminal as root user

Log into the WebDAV server by using https://192.168.1.(enter the last bit of number for your server IP address here)/share.  You will be asked to enter username and password.  The username should be fedora, and the password is the password that you had created earlier.

Troubleshooting:  You should check to see if you can ping your Apache server. Check to see if Apache server has a daemon running (i.e., ps aux | grep httpd).  Check to make sure firewall ports 80 and 443 are opened.  Check to make sure SELinux is disabled.  Check to see the configuration file for httpd.conf is correctly configured.  Check to see the configuration file for webdav.conf is correctly configured.  If permission 770 for /home/WebDAV isn’t working, try to change it to 755 or 777.  Make sure you had enabled SSL for Apache correctly.  If all failed, you might want to reboot Apache and to see if problems could be resolved this way.

About these ads

3 responses

  1. Pingback: Combining Local Virtualization And Remote Cloud Together Can Truly Help Everyday People Prevent Data Loss | EssayBoard

  2. Pingback: Combining Local Virtualization And Remote Cloud Together Can Truly Help Average People Prevent Data Loss | EssayBoard

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 793 other followers

%d bloggers like this: