问题
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?
回答1:
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 :/
回答2:
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.
回答3:
check the apache error log file. You might see additional info about why the svn server failed to finish the commit.
回答4:
Check other apache config files. In my default /etc/apache2/modules.d/00_default_settings.conf (on a gentoo install), I have a FilesMatch "^.ht"
section that does Deny from all
.
I'd suggest running a grep -r -i "\\.ht" *
from the /etc/apache or /etc/httpd or /etc/apache directory, to see what you come up with.
It may also be an AccessFileName
directive, so grep for that too.
回答5:
Are other files committing from TortoiseSVN?
If the commit is working from an SVN client on the same box as TortoiseSVN on the same working copy (can you verify?), then my guess would be different SVN and TortoiseSVN client versions causing the problem.
TortoiseSVN -> About
will report the SVN client version is was built with. Check that your client/server versions are compatible.
回答6:
<Files ~ "^\.ht">
Order allow,deny
Allow from all
Satisfy All
</Files>
This worked for me too. With a slight complexity I was doing it on a plesk server.
After adding above lines to my vhost file created in
/var/www/vhosts/system/[your domain]/conf
I ran following to rebuild the conf files
/usr/local/psa/admin/sbin/httpdmng --reconfigure-domain [your domain]
and the comit worked!
Thanks, hope this helps people using plesk
来源:https://stackoverflow.com/questions/1574655/why-doesnt-subversion-allow-to-commit-htaccess-files