Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've set up a Ubuntu server with Apache 2. Instead of FTP, I'm using WebDAV to upload/download files and it works great. However, it's not possible to upload/download or modify .htaccess files, because the Apache server returns an 404 (forbidden) error.

How is it possible to enable working with .htaccess files like with any other file?

By the way: don't worry. The WebDAV access run over a WebDAV-only host to avoid security issues.

share|improve this question

You can't access .htaccess or .htpasswd from a normal apache because it protects them. They have sensitive information inside (usernames, special commands, etc) and it correctly does not allow you to see them.

(s)ftp is the way to do it...

If you still want to edit them...try changing this config part inside your /etc/apache2/apache2.conf:

AccessFileName .htaccess

<Files ~ "^\.ht">
    Order allow,deny
    Deny from all


Deny from all


Allow from 
Deny from all

to allow your internal network clients to access these files...

share|improve this answer
Cool. It works. Thank you. – Bernd Aug 28 '09 at 13:03

what about disabling .htaccess files with

  <Directory DocumentRoot>
      # disable the .htaccess redirect in /var/www/.htaccess
      # AllowOv. only valid in <Dir > tag!
      AllowOverride None
      Order allow,deny
      allow from all                        
share|improve this answer

For completeness, one possible resolution would be switching to svnserve, Subversion's native server, if it's practical to do such a thing.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.