Generate a host key
First, make a home for the new SSL files. I use /etc/apache2/ssl. Open up a terminal window, cd to the new directory and issue the following command to create a host key file.
sudo ssh-keygen -f host.key
Generate a certificate request file
This command create a certificate request file. A certificate request file contains information about your organization that will be used in the SSL certificate.
sudo openssl req -new -key host.key -out request.csr
Create the SSL certificate
Create a self signed SSL certificate using the request file.
sudo openssl x509 -req -days 365 -in request.csr -signkey host.key -out server.crt
Configure Apache
Create a backup of /etc/apache2/httpd.conf.
Append the contents of /etc/apache2/extra/httpd-ssl.conf to /etc/apache2/httpd.conf.
In /etc/apache2/httpd.conf, make sure the loading of SSL is enabled (remove the #)
LoadModule ssl_module libexec/apache2/mod_ssl.so
Also, edit SSL section to use the new certificate.
SSLEngine on
SSLCertificateFile /etc/apache2/ssl/server.crt
SSLCertificateKeyFile /etc/apache2/ssl/host.key
Check the config and restart Apache to try the new certificate.
sudo apachectl configtest
sudo apachectl restart
Thanks to the House of Ding and Matt Langtree for providing much of this solution.
No, there shouldn't be a problem having 2 different versions of Subversion installed at the same time. MacPorts and Homebrew will install their executable binaries to a different path.
The version which actually gets executed when executing svn
in the shell depends on your $PATH environment variable, which contains a list of directories to search through, in order.
If your $PATH variable lists the directory where Homebrew installs binaries first (I believe this is the default configuration), svn
will use the more recent version.
Best Answer
Yes, you can run a native subversion server on your Mac to serve your virtual machines.
If your virtual machines can access services on your Mac, as your question suggests they can, then you can offer a subversion service natively on your Mac.
svnserve
The easiest approach is to use subversion's standalone server,
svnserve
:A copy of
svnserve
is included with Xcode:svnserve
does not require an Apachehttpd
instance or any other server to work. Thesvnserve
process listens and handles connections fromsvn
clients.Security Considerations
You can add tunnelling over
ssh
and other approaches to add security. Without additional configuration, a plainsvnserve
instance is not recommended for exposure to the Internet; it is not secure by default.However, for your local-only situation
svnserve
is likely enough.