Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why doesn't Subversion allow to commit .htaccess files?

I can't commit .htaccess files from my Windows SVN client (TortoiseSVN). The error that is returned is:

Could not read status line: Existing connection was forcibly closed by the remote host.

And here is basically what my vhost looks like in Apache:

<VirtualHost *:80>
  DocumentRoot /var/www/mydomain.com/legacy/trunk/html
  ServerName mydomain.com

  <Directory /var/www/>
    FileETag MTime Size
    AllowOverride All
  </Directory>

  <Directory /var/www/tools>
    AllowOverride All
  </Directory>

  <Location /svn>
    DAV svn
    SVNPath /var/svn/repos/MyRepo

    # Limit write permission to list of valid users.
    # Require SSL connection for password protection.
    # SSLRequireSSL
    ErrorDocument 404 default

    AuthType Basic
    AuthName "Authorization Realm"
    AuthUserFile /etc/httpd/conf/.htpasswd
    Require valid-user
  </Location>
</VirtualHost>

How can this be changed, so that .htaccess files can be committed?

like image 693
user38968 Avatar asked Jun 27 '26 01:06

user38968


2 Answers

Just found out how to fix that issue - just put this into your virtual host configuration in order to override global http.conf:

<Files ~ "^\.ht">
    Order allow,deny
    Allow from all
    Satisfy All
</Files>

Source

THIS is the correct answer for sure (tested), but the op abandoned his question :/

like image 171
Martin Zeitler Avatar answered Jun 29 '26 23:06

Martin Zeitler


Subversion is being served from an Apache server that's also using .htaccess for access control, so it might be preventing you from doing something you don't quite intend.

like image 44
Dean J Avatar answered Jun 29 '26 22:06

Dean J