https://larryli.vicp.net/svn 配置示例

# http 配置
<VirtualHost *:80>
ServerAdmin larryli@qq.com

使用独立的虚拟主机目录

DocumentRoot /xampplite/larryli/htdocs
ServerName larryli.vicp.net

logs 也放在独立目录中

ErrorLog /xampplite/larryli/logs/error.log
CustomLog /xampplite/larryli/logs/access.log common
<Directory "/xampplite/larryli/htdocs">

一般的安全设置

Options FollowSymLinks Includes
AllowOverride All
Order allow,deny
Allow from all
</Directory>
<IfModule dav_svn_module>
<Location /svn>
DAV svn

svn 也放在独立目录下

SVNPath /xampplite/larryli/svn
AuthType Basic
AuthName "larryli subversion repository"

svn-none 是一个空文件,这样就只允许 http://larryli.vicp.net/svn 读操作,禁止写

AuthUserFile /xampplite/larryli/conf/svn-none
<LimitExcept GET PROPFIND OPTIONS REPORT>
Require valid-user
</LimitExcept>
</Location>
</IfModule>
</VirtualHost>

https 配置

<VirtualHost *:443>
SSLEngine on
ServerSignature On

分开设置密钥

SSLCertificateFile /xampplite/larryli/conf/server.crt
SSLCertificateKeyFile /xampplite/larryli/conf/server.key
ServerAdmin larryli@qq.com
DocumentRoot /xampplite/larryli/htdocs
ServerName larryli.vicp.net

SSL 日志

ErrorLog /xampplite/larryli/logs/ssl-error.log
CustomLog /xampplite/larryli/logs/ssl-access.log common
<Directory "/xampplite/larryli/htdocs">
Options FollowSymLinks Includes
AllowOverride All
Order allow,deny
Allow from all
</Directory>
<IfModule dav_svn_module>
<Location /svn>
DAV svn
SVNPath /xampplite/larryli/svn
AuthType Basic
AuthName "larryli subversion repository"

用户认证文件

AuthUserFile /xampplite/larryli/conf/svn-passwd

https 下读写都需要认证

Require valid-user
</Location>
</IfModule>
</VirtualHost>

发表评论

此站点使用Akismet来减少垃圾评论。了解我们如何处理您的评论数据