<VirtualHost *:80>
  ServerName <%= @params[:server_name] %>

  <Location /svn>
    DAV svn
    SVNParentPath <%= node[:svn][:svn_home] %>/repositories
    AuthType Basic
    AuthName "Subversion repository"
    AuthUserFile <%= @params[:htpasswd_path] %>
    Require valid-user

    AuthzSVNAccessFile <%= node[:svn][:svn_home] %>/auth.conf

  </Location>

  LogLevel info
  ErrorLog <%= node[:apache][:log_dir] %>/<%= @params[:server_name] %>-error.log
  CustomLog <%= node[:apache][:log_dir] %>/<%= @params[:server_name] %>-access.log combined

</VirtualHost>
<VirtualHost *:80>
  ServerName <%= @params[:server_name] %>
  ServerAlias localhost

  <Location /svn>
    DAV svn
    SVNParentPath <%= node[:svn][:svn_home] %>/repositories
    AuthType Basic
    AuthName "Subversion repository"
    AuthUserFile <%= @params[:htpasswd_path] %>
    Require valid-user

    AuthzSVNAccessFile <%= node[:svn][:svn_home] %>/auth.conf

  </Location>

  LogLevel info
  ErrorLog <%= node[:apache][:log_dir] %>/<%= @params[:server_name] %>-error.log
  CustomLog <%= node[:apache][:log_dir] %>/<%= @params[:server_name] %>-access.log combined

</VirtualHost>
Support the slightly perverse use case of a server checking out application code from itself
Support the slightly perverse use case of a server checking out application code from itself
