<?xml version="1.0"?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0">
  <channel>
    <title>CRIN Trac: Ticket #8: Install phpMyAdmin on crin1 and enable encrypted connections from crin2</title>
    <link>https://trac.crin.org/trac/ticket/8</link>
    <description>&lt;p&gt;
The plan is to have Drupal on crin2 connecting to the MySQL server on crin1 using SSL/TLS and also have phpMyAdmin running on crin1 with HTTP Authentication.
&lt;/p&gt;
&lt;p&gt;
See:
&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;&lt;a class="ext-link" href="https://www.howtoforge.com/managing-multiple-mysql-servers-from-one-phpmyadmin-installation-using-ssl-encryption"&gt;&lt;span class="icon"&gt;​&lt;/span&gt;https://www.howtoforge.com/managing-multiple-mysql-servers-from-one-phpmyadmin-installation-using-ssl-encryption&lt;/a&gt;
&lt;/li&gt;&lt;/ul&gt;</description>
    <language>en-us</language>
    <image>
      <title>CRIN Trac</title>
      <url>https://trac.crin.org/trac/chrome/site/logo.gif</url>
      <link>https://trac.crin.org/trac/ticket/8</link>
    </image>
    <generator>Trac 1.0.2</generator>
    <item>
      
        <dc:creator>chris</dc:creator>

      <pubDate>Wed, 29 Apr 2015 11:34:23 GMT</pubDate>
      <title>summary changed</title>
      <link>https://trac.crin.org/trac/ticket/8#comment:1</link>
      <guid isPermaLink="false">https://trac.crin.org/trac/ticket/8#comment:1</guid>
      <description>
          &lt;ul&gt;
            &lt;li&gt;&lt;strong&gt;summary&lt;/strong&gt;
                changed from &lt;em&gt;Install phpMyAdmin on crin1 and enable encrypted connections form crin2&lt;/em&gt; to &lt;em&gt;Install phpMyAdmin on crin1 and enable encrypted connections from crin2&lt;/em&gt;
            &lt;/li&gt;
          &lt;/ul&gt;
      </description>
      <category>Ticket</category>
    </item><item>
      
        <dc:creator>chris</dc:creator>

      <pubDate>Sun, 03 May 2015 13:16:52 GMT</pubDate>
      <title>hours changed; totalhours set</title>
      <link>https://trac.crin.org/trac/ticket/8#comment:2</link>
      <guid isPermaLink="false">https://trac.crin.org/trac/ticket/8#comment:2</guid>
      <description>
          &lt;ul&gt;
            &lt;li&gt;&lt;strong&gt;hours&lt;/strong&gt;
                changed from &lt;em&gt;0&lt;/em&gt; to &lt;em&gt;1.3&lt;/em&gt;
            &lt;/li&gt;
            &lt;li&gt;&lt;strong&gt;totalhours&lt;/strong&gt;
                set to &lt;em&gt;1.3&lt;/em&gt;
            &lt;/li&gt;
          &lt;/ul&gt;
        &lt;p&gt;
Install:
&lt;/p&gt;
&lt;pre class="wiki"&gt;aptitude install phpmyadmin
&lt;/pre&gt;&lt;p&gt;
Delete the symlink in &lt;tt&gt;/etc/apache2/conf-enabled&lt;/tt&gt; as we don't want phpMyAdmin to be available for every site:
&lt;/p&gt;
&lt;pre class="wiki"&gt;rm /etc/apache2/conf-enabled/phpmyadmin.conf
&lt;/pre&gt;&lt;p&gt;
Create a new VirtualHost for phpMyAdmin, &lt;tt&gt;/etc/apache2/sites-available/phpmyadmin.conf&lt;/tt&gt;
&lt;/p&gt;
&lt;pre class="wiki"&gt;&amp;lt;VirtualHost *:80&amp;gt;
        &amp;lt;IfModule mpm_itk_module&amp;gt;
                AssignUserID www-data www-data
                MaxClientsVHost 60
        &amp;lt;/IfModule&amp;gt;
        ServerName phpmyadmin.crin.org
        Redirect / https://phpmyadmin.crin.org/
&amp;lt;/VirtualHost&amp;gt;
&amp;lt;IfModule mod_ssl.c&amp;gt;
&amp;lt;VirtualHost *:443&amp;gt;
        &amp;lt;IfModule mpm_itk_module&amp;gt;
                AssignUserID www-data www-data
                MaxClientsVHost 60
        &amp;lt;/IfModule&amp;gt;
        ServerName phpmyadmin.crin.org
        SSLEngine on
        SSLCertificateFile    /etc/ssl/gandi/stats.crt.pem
        SSLCertificateKeyFile /etc/ssl/gandi/stats.key.pem
        SSLCACertificateFile  /etc/ssl/gandi/root.pem
        DocumentRoot /usr/share/phpmyadmin
        &amp;lt;Directory /usr/share/phpmyadmin&amp;gt;
            Options FollowSymLinks
            DirectoryIndex index.php
            AuthType Digest
            AuthName "phpmyadmin"
            AuthDigestDomain /phpmyadmin
            AuthUserFile /etc/phpmyadmin/.htpasswd
            &amp;lt;IfModule mod_php5.c&amp;gt;
                &amp;lt;IfModule mod_mime.c&amp;gt;
                    AddType application/x-httpd-php .php
                &amp;lt;/IfModule&amp;gt;
                &amp;lt;FilesMatch ".+\.php$"&amp;gt;
                    SetHandler application/x-httpd-php
                &amp;lt;/FilesMatch&amp;gt;
                php_flag magic_quotes_gpc Off
                php_flag track_vars On
                php_flag register_globals Off
                php_admin_flag allow_url_fopen Off
                php_value include_path .
                php_admin_value upload_tmp_dir /var/lib/phpmyadmin/tmp
                php_admin_value open_basedir /usr/share/phpmyadmin/:/etc/phpmyadmin/:/var/lib/phpmyadmin/:/usr/share/php/php-gettext/:/usr/share/javascript/:/usr/share/php/tcpdf/
            &amp;lt;/IfModule&amp;gt;
        &amp;lt;/Directory&amp;gt;
        # Authorize for setup
        #&amp;lt;Directory /usr/share/phpmyadmin/setup&amp;gt;
        #    &amp;lt;IfModule mod_authz_core.c&amp;gt;
        #        &amp;lt;IfModule mod_authn_file.c&amp;gt;
        #            AuthType Basic
        #            AuthName "phpMyAdmin Setup"
        #            AuthUserFile /etc/phpmyadmin/htpasswd.setup
        #        &amp;lt;/IfModule&amp;gt;
        #        Require valid-user
        #    &amp;lt;/IfModule&amp;gt;
        #&amp;lt;/Directory&amp;gt;
        # Disallow web access to directories that don't need it
        &amp;lt;Directory /usr/share/phpmyadmin/libraries&amp;gt;
            Require all denied
        &amp;lt;/Directory&amp;gt;
        &amp;lt;Directory /usr/share/phpmyadmin/setup/lib&amp;gt;
            Require all denied
        &amp;lt;/Directory&amp;gt;
        &amp;lt;IfModule headers_module&amp;gt;
                # Use HTTP Strict Transport Security to force client to use secure connections only
                Header always set Strict-Transport-Security "max-age=31536000"
                # mitigate TIME attack
                Header always append X-Frame-Options "sameorigin"
        &amp;lt;/IfModule&amp;gt;
        &amp;lt;FilesMatch "\.(cgi|shtml|phtml|php)$"&amp;gt;
                SSLOptions +StdEnvVars
        &amp;lt;/FilesMatch&amp;gt;
        &amp;lt;Directory /usr/lib/cgi-bin&amp;gt;
                SSLOptions +StdEnvVars
        &amp;lt;/Directory&amp;gt;
        BrowserMatch "MSIE [2-6]" \
                nokeepalive ssl-unclean-shutdown \
                downgrade-1.0 force-response-1.0
        # MSIE 7 and newer should be able to use keepalive
        BrowserMatch "MSIE [17-9]" ssl-unclean-shutdown
&amp;lt;/VirtualHost&amp;gt;
&amp;lt;/IfModule&amp;gt;
&lt;/pre&gt;&lt;p&gt;
Generate a username and password, where XXX is the username:
&lt;/p&gt;
&lt;pre class="wiki"&gt;cd /etc/phpmyadmin
htdigest -c .htpasswd phpmyadmin XXX
chown root:www-data .htpasswd
chmod 640 .htpasswd
&lt;/pre&gt;&lt;p&gt;
Generate a key pair via &lt;a class="ext-link" href="https://www.cacert.org/"&gt;&lt;span class="icon"&gt;​&lt;/span&gt;https://www.cacert.org/&lt;/a&gt; using &lt;a class="ext-link" href="https://wiki.cacert.org/CSRGenerator"&gt;&lt;span class="icon"&gt;​&lt;/span&gt;https://wiki.cacert.org/CSRGenerator&lt;/a&gt; as we don't need a commercial certificate for this site.
&lt;/p&gt;
&lt;pre class="wiki"&gt;cd /root/bin
wget http://svn.cacert.org/CAcert/Software/CSRGenerator/csr
chmod 700 csr
./csr
  Private Key and Certificate Signing Request Generator
  This script was designed to suit the request format needed by
  the CAcert Certificate Authority. www.CAcert.org
  Short Hostname (ie. imap big_srv www2): crin1
  FQDN/CommonName (ie. www.example.com) : crin1.crin.org
  Type SubjectAltNames for the certificate, one per line. Enter a blank line to finish
  SubjectAltName: DNS:crin1.crin.org
  SubjectAltName: DNS:phpmyadmin.crin.org
  SubjectAltName: DNS:*.crin1.crin.org
  SubjectAltName: DNS:
  Running OpenSSL...
  Generating a 2048 bit RSA private key
  .............................
&lt;/pre&gt;&lt;p&gt;
And that failed as I had forgotten that we haven't authorised the crin.org domain with CAcert.org (this can be sorted via a email to admin@… when Jonas is available), so set up webarch.net subdomains and generate a new csr:
&lt;/p&gt;
&lt;pre class="wiki"&gt;./csr
Private Key and Certificate Signing Request Generator
This script was designed to suit the request format needed by
the CAcert Certificate Authority. www.CAcert.org
Short Hostname (ie. imap big_srv www2): crin1
FQDN/CommonName (ie. www.example.com) : crin1.webarch.net
Type SubjectAltNames for the certificate, one per line. Enter a blank line to finish
SubjectAltName: DNS:crin1.webarch.net
SubjectAltName: DNS:*.crin1.webarch.net
SubjectAltName: DNS:
Running OpenSSL...
Generating a 2048 bit RSA private key
.................
&lt;/pre&gt;&lt;p&gt;
Save the cert as &lt;tt&gt;/root/crin1_cert.pem&lt;/tt&gt; and then copy to cacert dir:
&lt;/p&gt;
&lt;pre class="wiki"&gt;mkdir /etc/ssl/cacert
chmod 700 /etc/ssl/cacert
cd /etc/ssl
mv /root/crin1_* .
chmod 600 *.*
wget https://www.cacert.org/certs/root.crt --no-check-certificate
wget https://www.cacert.org/certs/class3.crt --no-check-certificate
cat root.crt &amp;gt; cacert.pem
cat class3.crt &amp;gt;&amp;gt; cacert.pem
&lt;/pre&gt;&lt;p&gt;
Edit the Apache config:
&lt;/p&gt;
&lt;pre class="wiki"&gt;        ServerAlias phpmyadmin.crin1.webarch.net
        SSLCertificateFile    /etc/ssl/cacert/crin1_cert.pem
        SSLCertificateKeyFile /etc/ssl/cacert/crin1_privatekey.pem
        SSLCACertificateFile  /etc/ssl/cacert/cacert.pem
        Require valid-user
&lt;/pre&gt;&lt;p&gt;
Symlink and test and restart:
&lt;/p&gt;
&lt;pre class="wiki"&gt;cd /etc/apache2/sites-enabled/
ln -s ../sites-available/phpmyadmin.conf 40-phpmyadmin.conf
apache2ctl configtest
  Syntax OK
service apache2 restart
&lt;/pre&gt;&lt;p&gt;
And test at the following URL and all is working OK:
&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;&lt;a class="ext-link" href="https://phpmyadmin.crin1.webarch.net/"&gt;&lt;span class="icon"&gt;​&lt;/span&gt;https://phpmyadmin.crin1.webarch.net/&lt;/a&gt;
&lt;/li&gt;&lt;/ul&gt;
      </description>
      <category>Ticket</category>
    </item><item>
      
        <dc:creator>chris</dc:creator>

      <pubDate>Sun, 03 May 2015 13:30:54 GMT</pubDate>
      <title>hours, totalhours changed</title>
      <link>https://trac.crin.org/trac/ticket/8#comment:3</link>
      <guid isPermaLink="false">https://trac.crin.org/trac/ticket/8#comment:3</guid>
      <description>
          &lt;ul&gt;
            &lt;li&gt;&lt;strong&gt;hours&lt;/strong&gt;
                changed from &lt;em&gt;0&lt;/em&gt; to &lt;em&gt;0.15&lt;/em&gt;
            &lt;/li&gt;
            &lt;li&gt;&lt;strong&gt;totalhours&lt;/strong&gt;
                changed from &lt;em&gt;1.3&lt;/em&gt; to &lt;em&gt;1.45&lt;/em&gt;
            &lt;/li&gt;
          &lt;/ul&gt;
        &lt;p&gt;
We don't need access to the edit the phpMyAdmin configuration so that was disabled, the final &lt;tt&gt;phpmyadmin.conf&lt;/tt&gt; file:
&lt;/p&gt;
&lt;pre class="wiki"&gt;&amp;lt;VirtualHost *:80&amp;gt;
        &amp;lt;IfModule mpm_itk_module&amp;gt;
                AssignUserID www-data www-data
                MaxClientsVHost 60
        &amp;lt;/IfModule&amp;gt;
        ServerName phpmyadmin.crin.org
        ServerAlias phpmyadmin.crin1.webarch.net
        &amp;lt;If "%{HTTP_HOST} == 'phpmyadmin.crin1.webarch.net'"&amp;gt;
                Redirect / https://phpmyadmin.crin1.webarch.net/
        &amp;lt;/If&amp;gt;
        &amp;lt;If "%{HTTP_HOST} == 'phpmyadmin.crin.org'"&amp;gt;
                Redirect / https://phpmyadmin.crin.org/
        &amp;lt;/If&amp;gt;
&amp;lt;/VirtualHost&amp;gt;
&amp;lt;IfModule mod_ssl.c&amp;gt;
&amp;lt;VirtualHost *:443&amp;gt;
        &amp;lt;IfModule mpm_itk_module&amp;gt;
                AssignUserID www-data www-data
                MaxClientsVHost 60
        &amp;lt;/IfModule&amp;gt;
        ServerName phpmyadmin.crin.org
        ServerAlias phpmyadmin.crin1.webarch.net
        SSLEngine on
        SSLCertificateFile    /etc/ssl/cacert/crin1_cert.pem
        SSLCertificateKeyFile /etc/ssl/cacert/crin1_privatekey.pem
        SSLCACertificateFile  /etc/ssl/cacert/cacert.pem
        DocumentRoot /usr/share/phpmyadmin
        &amp;lt;Directory /usr/share/phpmyadmin&amp;gt;
            Options FollowSymLinks
            DirectoryIndex index.php
            AuthType Digest
            AuthName "phpmyadmin"
            AuthDigestDomain /phpmyadmin
            AuthUserFile /etc/phpmyadmin/.htpasswd
            Require valid-user
            &amp;lt;IfModule mod_php5.c&amp;gt;
                &amp;lt;IfModule mod_mime.c&amp;gt;
                    AddType application/x-httpd-php .php
                &amp;lt;/IfModule&amp;gt;
                &amp;lt;FilesMatch ".+\.php$"&amp;gt;
                    SetHandler application/x-httpd-php
                &amp;lt;/FilesMatch&amp;gt;
                php_flag magic_quotes_gpc Off
                php_flag track_vars On
                php_flag register_globals Off
                php_admin_flag allow_url_fopen Off
                php_value include_path .
                php_admin_value upload_tmp_dir /var/lib/phpmyadmin/tmp
                php_admin_value open_basedir /usr/share/phpmyadmin/:/etc/phpmyadmin/:/var/lib/phpmyadmin/:/usr/share/php/php-gettext/:/usr/share/javascript/:/usr/share/php/tcpdf/
            &amp;lt;/IfModule&amp;gt;
        &amp;lt;/Directory&amp;gt;
        # Authorize for setup
        &amp;lt;Directory /usr/share/phpmyadmin/setup&amp;gt;
        #    &amp;lt;IfModule mod_authz_core.c&amp;gt;
        #        &amp;lt;IfModule mod_authn_file.c&amp;gt;
        #            AuthType Basic
        #            AuthName "phpMyAdmin Setup"
        #            AuthUserFile /etc/phpmyadmin/htpasswd.setup
        #        &amp;lt;/IfModule&amp;gt;
        #        Require valid-user
        #    &amp;lt;/IfModule&amp;gt;
            Require all denied
        &amp;lt;/Directory&amp;gt;
        # Disallow web access to directories that don't need it
        &amp;lt;Directory /usr/share/phpmyadmin/libraries&amp;gt;
            Require all denied
        &amp;lt;/Directory&amp;gt;
        &amp;lt;Directory /usr/share/phpmyadmin/setup/lib&amp;gt;
            Require all denied
        &amp;lt;/Directory&amp;gt;
        &amp;lt;IfModule headers_module&amp;gt;
                # Use HTTP Strict Transport Security to force client to use secure connections only
                Header always set Strict-Transport-Security "max-age=31536000"
                # mitigate TIME attack
                Header always append X-Frame-Options "sameorigin"
        &amp;lt;/IfModule&amp;gt;
        &amp;lt;FilesMatch "\.(cgi|shtml|phtml|php)$"&amp;gt;
                SSLOptions +StdEnvVars
        &amp;lt;/FilesMatch&amp;gt;
        &amp;lt;Directory /usr/lib/cgi-bin&amp;gt;
                SSLOptions +StdEnvVars
        &amp;lt;/Directory&amp;gt;
        BrowserMatch "MSIE [2-6]" \
                nokeepalive ssl-unclean-shutdown \
                downgrade-1.0 force-response-1.0
        # MSIE 7 and newer should be able to use keepalive
        BrowserMatch "MSIE [17-9]" ssl-unclean-shutdown
&amp;lt;/VirtualHost&amp;gt;
&amp;lt;/IfModule&amp;gt;
&lt;/pre&gt;
      </description>
      <category>Ticket</category>
    </item><item>
      
        <dc:creator>chris</dc:creator>

      <pubDate>Sun, 03 May 2015 16:13:55 GMT</pubDate>
      <title>hours, totalhours changed</title>
      <link>https://trac.crin.org/trac/ticket/8#comment:4</link>
      <guid isPermaLink="false">https://trac.crin.org/trac/ticket/8#comment:4</guid>
      <description>
          &lt;ul&gt;
            &lt;li&gt;&lt;strong&gt;hours&lt;/strong&gt;
                changed from &lt;em&gt;0&lt;/em&gt; to &lt;em&gt;2.1&lt;/em&gt;
            &lt;/li&gt;
            &lt;li&gt;&lt;strong&gt;totalhours&lt;/strong&gt;
                changed from &lt;em&gt;1.45&lt;/em&gt; to &lt;em&gt;3.55&lt;/em&gt;
            &lt;/li&gt;
          &lt;/ul&gt;
        &lt;p&gt;
Testing SSL/TLS encrypted MySQL access from &lt;a class="wiki" href="https://trac.crin.org/trac/wiki/Crin2"&gt;Crin2&lt;/a&gt; to &lt;a class="wiki" href="https://trac.crin.org/trac/wiki/Crin1"&gt;Crin1&lt;/a&gt;, will it work with the CAcert.org cert and the current version of OpenSSL or will openssl-0.9.8 be needed as before?
&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;&lt;a class="ext-link" href="http://www.howtoforge.com/managing-multiple-mysql-servers-from-one-phpmyadmin-installation-using-ssl-encryption"&gt;&lt;span class="icon"&gt;​&lt;/span&gt;http://www.howtoforge.com/managing-multiple-mysql-servers-from-one-phpmyadmin-installation-using-ssl-encryption&lt;/a&gt;
&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;
On &lt;a class="wiki" href="https://trac.crin.org/trac/wiki/Crin2"&gt;Crin2&lt;/a&gt;:
&lt;/p&gt;
&lt;pre class="wiki"&gt;sudo -i
mkdir /root/bin
cd bin
wget http://svn.cacert.org/CAcert/Software/CSRGenerator/csr
chmod 700 csr
./csr
Private Key and Certificate Signing Request Generator
This script was designed to suit the request format needed by
the CAcert Certificate Authority. www.CAcert.org
Short Hostname (ie. imap big_srv www2): crin2
FQDN/CommonName (ie. www.example.com) : crin2.webarch.net
Type SubjectAltNames for the certificate, one per line. Enter a blank line to finish
SubjectAltName: DNS:crin2.webarch.net
SubjectAltName: DNS:*.crin2.webarch.net
SubjectAltName: DNS:
Running OpenSSL...
Generating a 2048 bit RSA private key
............
&lt;/pre&gt;&lt;p&gt;
Save the cert as &lt;tt&gt;/root/crin2_cert.pem&lt;/tt&gt; then move and get the root:
&lt;/p&gt;
&lt;pre class="wiki"&gt;mkdir /etc/ssl/cacert
chmod 700 /etc/ssl/cacert/
cd /etc/ssl/cacert/
mv /root/crin2_* .
wget https://www.cacert.org/certs/root.crt --no-check-certificate
wget https://www.cacert.org/certs/class3.crt --no-check-certificate
cat root.crt &amp;gt; cacert.pem
cat class3.crt &amp;gt;&amp;gt; cacert.pem
chmod 600 *.pem
&lt;/pre&gt;&lt;p&gt;
On &lt;a class="wiki" href="https://trac.crin.org/trac/wiki/Crin2"&gt;Crin2&lt;/a&gt; (the client) create a &lt;tt&gt;/root/.my.cnf&lt;/tt&gt;:
&lt;/p&gt;
&lt;pre class="wiki"&gt;[client]
host=crin1
#ssl-cipher=DHE-RSA-AES256-SHA
ssl-ca=/etc/ssl/cacert/cacert.pem
ssl-cert=/etc/ssl/cacert/crin2_cert.pem
ssl-key=/etc/ssl/cacert/crin2_privatekey.pem
&lt;/pre&gt;&lt;p&gt;
On &lt;a class="wiki" href="https://trac.crin.org/trac/wiki/Crin1"&gt;Crin1&lt;/a&gt; (the server) create a test user and database:
&lt;/p&gt;
&lt;pre class="wiki"&gt;mysql
  mysql&amp;gt; CREATE DATABASE example;
  mysql&amp;gt; GRANT ALL ON example.* to 'example'@'crin2' identified by 'XXX' REQUIRE SSL;
  mysql&amp;gt; FLUSH PRIVILEGES;
&lt;/pre&gt;&lt;p&gt;
On &lt;a class="wiki" href="https://trac.crin.org/trac/wiki/Crin2"&gt;Crin2&lt;/a&gt; (the client) add the following to &lt;tt&gt;/etc/hosts&lt;/tt&gt;:
&lt;/p&gt;
&lt;pre class="wiki"&gt;93.95.228.179   crin1 crin1.crin.org crin1.webarch.net
&lt;/pre&gt;&lt;p&gt;
on &lt;a class="wiki" href="https://trac.crin.org/trac/wiki/Crin1"&gt;Crin1&lt;/a&gt; (the server) edit &lt;tt&gt;/etc/mysql/my.cnf&lt;/tt&gt; and add:
&lt;/p&gt;
&lt;pre class="wiki"&gt;ssl=on
#ssl-cipher=DHE-RSA-AES256-SHA
ssl-ca=/etc/ssl/cacert/cacert.pem
ssl-cert=/etc/ssl/cacert/crin1_cert.pem
ssl-key=/etc/ssl/cacert/crin1_privatekey.pem
&lt;/pre&gt;&lt;p&gt;
On &lt;a class="wiki" href="https://trac.crin.org/trac/wiki/Crin2"&gt;Crin2&lt;/a&gt; copy the cert from &lt;a class="wiki" href="https://trac.crin.org/trac/wiki/Crin1"&gt;Crin1&lt;/a&gt;, install the MySQL client and try to connect:
&lt;/p&gt;
&lt;pre class="wiki"&gt;aptitude install mysql-client-5.5
mysql -uexample -pXXX -hcrin1 --ssl-ca=/etc/ssl/cacert/cacert.pem --ssl-cert=/etc/ssl/cacert/crin1_cert.pem example
  ERROR 2003 (HY000): Can't connect to MySQL server on 'crin1' (111)
&lt;/pre&gt;&lt;p&gt;
On &lt;a class="wiki" href="https://trac.crin.org/trac/wiki/Crin1"&gt;Crin1&lt;/a&gt; check the firewall:
&lt;/p&gt;
&lt;pre class="wiki"&gt;iptables -L | grep crin2
ACCEPT     tcp  --  crin2                anywhere             tcp dpt:mysql
&lt;/pre&gt;&lt;p&gt;
On &lt;a class="wiki" href="https://trac.crin.org/trac/wiki/Crin2"&gt;Crin2&lt;/a&gt; check the name resolves:
&lt;/p&gt;
&lt;pre class="wiki"&gt;ping crin1
PING crin1 (93.95.228.179) 56(84) bytes of data.
64 bytes from crin1 (93.95.228.179): icmp_seq=1 ttl=64 time=0.690 ms
&lt;/pre&gt;&lt;p&gt;
Edit &lt;tt&gt;/etc/mysql/my.cnf&lt;/tt&gt; on &lt;a class="wiki" href="https://trac.crin.org/trac/wiki/Crin1"&gt;Crin1&lt;/a&gt; and restart:
&lt;/p&gt;
&lt;pre class="wiki"&gt;bind-address            = 93.95.228.179
&lt;/pre&gt;&lt;p&gt;
Now we have this error:
&lt;/p&gt;
&lt;pre class="wiki"&gt;ERROR 1045 (28000): Access denied for user 'example'@'crin2' (using password: YES)
&lt;/pre&gt;&lt;p&gt;
Which is progress!
&lt;/p&gt;
&lt;p&gt;
Edit &lt;tt&gt;my.cnf&lt;/tt&gt; to listen on all interfaces:
&lt;/p&gt;
&lt;pre class="wiki"&gt;bind-address            = 0.0.0.0
&lt;/pre&gt;&lt;p&gt;
Restart and check the logs, we have this in &lt;tt&gt;/var/log/mysql/error.log&lt;/tt&gt;
&lt;/p&gt;
&lt;pre class="wiki"&gt;SSL error: Unable to get certificate from '/etc/ssl/cacert/crin1_cert.pem'
&lt;/pre&gt;&lt;p&gt;
Could be a permission issue:
&lt;/p&gt;
&lt;pre class="wiki"&gt;chown -R root:mysql /etc/ssl/cacert/
chmod 640 /etc/ssl/cacert/*.pem
chmod 750 /etc/ssl/cacert/
service mysql restart
&lt;/pre&gt;&lt;p&gt;
And now we have:
&lt;/p&gt;
&lt;pre class="wiki"&gt;SSL error: Unable to get private key from '/etc/ssl/cacert/crin1_privatekey.pem'
150503 15:14:25 [Warning] Failed to setup SSL
150503 15:14:25 [Warning] SSL error: Unable to get private key
&lt;/pre&gt;&lt;p&gt;
Found this:
&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;&lt;a class="ext-link" href="http://forums.mysql.com/read.php?11,400856,401127#msg-401127"&gt;&lt;span class="icon"&gt;​&lt;/span&gt;http://forums.mysql.com/read.php?11,400856,401127#msg-401127&lt;/a&gt;
&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;
So edited the private first and last lines from:
&lt;/p&gt;
&lt;pre class="wiki"&gt;-----BEGIN PRIVATE KEY-----
...
-----END PRIVATE KEY-----
&lt;/pre&gt;&lt;p&gt;
Into:
&lt;/p&gt;
&lt;pre class="wiki"&gt;-----BEGIN RSA PRIVATE KEY-----
...
-----END RSA PRIVATE KEY-----
&lt;/pre&gt;&lt;p&gt;
And restarted, no errors!
&lt;/p&gt;
&lt;p&gt;
Tested from &lt;a class="wiki" href="https://trac.crin.org/trac/wiki/Crin2"&gt;Crin2&lt;/a&gt;, and now there is this error:
&lt;/p&gt;
&lt;pre class="wiki"&gt;ERROR 2026 (HY000): SSL connection error: protocol version mismatch
&lt;/pre&gt;&lt;p&gt;
Following the suggestion at the end of this thread, removed &lt;tt&gt;RSA&lt;/tt&gt; on &lt;a class="wiki" href="https://trac.crin.org/trac/wiki/Crin1"&gt;Crin1&lt;/a&gt;
&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;&lt;a class="ext-link" href="https://bugs.mysql.com/bug.php?id=64870"&gt;&lt;span class="icon"&gt;​&lt;/span&gt;https://bugs.mysql.com/bug.php?id=64870&lt;/a&gt;
&lt;/li&gt;&lt;/ul&gt;&lt;pre class="wiki"&gt;cd /etc/ssl/cacert
openssl rsa -in crin1_privatekey.pem -out crin1_yassl_privatekey.pem
&lt;/pre&gt;&lt;p&gt;
Tried connecting again from &lt;a class="wiki" href="https://trac.crin.org/trac/wiki/Crin2"&gt;Crin2&lt;/a&gt; and got:
&lt;/p&gt;
&lt;pre class="wiki"&gt;SSL error: Unable to get private key from '/etc/ssl/cacert/crin2_yassl_privatekey.pem'
ERROR 2026 (HY000): SSL connection error: Unable to get private key
&lt;/pre&gt;&lt;p&gt;
Copied the &lt;a class="wiki" href="https://trac.crin.org/trac/wiki/Crin1"&gt;Crin1&lt;/a&gt; private key to &lt;a class="wiki" href="https://trac.crin.org/trac/wiki/Crin2"&gt;Crin2&lt;/a&gt; and tried:
&lt;/p&gt;
&lt;pre class="wiki"&gt;mysql -uexample -pXXXX -hcrin1 --ssl-ca=/etc/ssl/cacert/cacert.pem --ssl-cert=/etc/ssl/cacert/crin1_cert.pem --ssl-key=/etc/ssl/cacert/crin1_yassl_privatekey.pem example
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 42
Server version: 5.5.43-0+deb8u1 (Debian)
Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql&amp;gt; show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| example            |
+--------------------+
2 rows in set (0.00 sec)
&lt;/pre&gt;&lt;p&gt;
Edited &lt;tt&gt;/root/.my.cnf&lt;/tt&gt; on &lt;a class="wiki" href="https://trac.crin.org/trac/wiki/Crin2"&gt;Crin2&lt;/a&gt;:
&lt;/p&gt;
&lt;pre class="wiki"&gt;[client]
host=crin1
ssl-cipher=DHE-RSA-AES256-SHA
ssl-ca=/etc/ssl/cacert/cacert.pem
ssl-cert=/etc/ssl/cacert/crin1_cert.pem
ssl-key=/etc/ssl/cacert/crin1_yassl_privatekey.pem
&lt;/pre&gt;&lt;p&gt;
Test the firewall from another server:
&lt;/p&gt;
&lt;pre class="wiki"&gt;nmap 93.95.228.179
Starting Nmap 6.00 ( http://nmap.org ) at 2015-05-03 15:45 GMT
Nmap scan report for crin1.crin.org (93.95.228.179)
Host is up (0.00079s latency).
Not shown: 997 filtered ports
PORT    STATE SERVICE
22/tcp  open  ssh
80/tcp  open  http
443/tcp open  https
Nmap done: 1 IP address (1 host up) scanned in 5.32 seconds
&lt;/pre&gt;&lt;p&gt;
Test it from &lt;a class="wiki" href="https://trac.crin.org/trac/wiki/Crin2"&gt;Crin2&lt;/a&gt;:
&lt;/p&gt;
&lt;pre class="wiki"&gt;aptitude install nmap
 nmap 93.95.228.179
Starting Nmap 6.47 ( http://nmap.org ) at 2015-05-03 15:50 GMT
Nmap scan report for crin1 (93.95.228.179)
Host is up (0.00096s latency).
Not shown: 996 filtered ports
PORT     STATE SERVICE
22/tcp   open  ssh
80/tcp   open  http
443/tcp  open  https
3306/tcp open  mysql
MAC Address: 52:54:5D:5F:E4:B3 (Unknown)
Nmap done: 1 IP address (1 host up) scanned in 8.29 seconds
&lt;/pre&gt;&lt;p&gt;
On &lt;a class="wiki" href="https://trac.crin.org/trac/wiki/Crin1"&gt;Crin1&lt;/a&gt; edited the MySQL config file to uncomment these lines and restarted.
&lt;/p&gt;
&lt;pre class="wiki"&gt;general_log_file        = /var/log/mysql/mysql.log
general_log             = 1
&lt;/pre&gt;&lt;p&gt;
And connected again from &lt;a class="wiki" href="https://trac.crin.org/trac/wiki/Crin2"&gt;Crin2&lt;/a&gt; to see what was logged:
&lt;/p&gt;
&lt;pre class="wiki"&gt;150503 15:56:17    38 Connect   example@crin2 on example
                   38 Query     show databases
                   38 Query     show tables
                   38 Query     select @@version_comment limit 1
&lt;/pre&gt;&lt;p&gt;
On &lt;a class="wiki" href="https://trac.crin.org/trac/wiki/Crin2"&gt;Crin2&lt;/a&gt;, moved the &lt;tt&gt;/root/.my.cnf&lt;/tt&gt; and tried to connect:
&lt;/p&gt;
&lt;pre class="wiki"&gt;mysql -uexample -pXXX -hcrin1 example
ERROR 1045 (28000): Access denied for user 'example'@'crin2' (using password: YES)
&lt;/pre&gt;&lt;p&gt;
And there was this in the logs on &lt;a class="wiki" href="https://trac.crin.org/trac/wiki/Crin1"&gt;Crin1&lt;/a&gt;:
&lt;/p&gt;
&lt;pre class="wiki"&gt;150503 15:57:41    39 Connect   example@crin2 on example
                   39 Connect   Access denied for user 'example'@'crin2' (using password: YES)
&lt;/pre&gt;&lt;p&gt;
This means that I'm sure that only SSL connections are being allowed, logging was switched off again:
&lt;/p&gt;
&lt;pre class="wiki"&gt;general_log             = 0
&lt;/pre&gt;&lt;p&gt;
And here is another test, from &lt;a class="wiki" href="https://trac.crin.org/trac/wiki/Crin2"&gt;Crin2&lt;/a&gt;:
&lt;/p&gt;
&lt;pre class="wiki"&gt;mysql&amp;gt; \s
--------------
mysql  Ver 14.14 Distrib 5.5.43, for debian-linux-gnu (x86_64) using readline 6.3
Connection id:          43
Current database:       example
Current user:           example@crin2
SSL:                    Cipher in use is DHE-RSA-AES256-SHA
Current pager:          stdout
Using outfile:          ''
Using delimiter:        ;
Server version:         5.5.43-0+deb8u1 (Debian)
Protocol version:       10
Connection:             crin1 via TCP/IP
Server characterset:    latin1
Db     characterset:    latin1
Client characterset:    utf8
Conn.  characterset:    utf8
TCP port:               3306
Uptime:                 8 min 31 sec
Threads: 1  Questions: 129  Slow queries: 0  Opens: 181  Flush tables: 1  Open tables: 174  Queries per second avg: 0.252
--------------
&lt;/pre&gt;&lt;p&gt;
Compare that to a connection on &lt;a class="wiki" href="https://trac.crin.org/trac/wiki/Crin1"&gt;Crin1&lt;/a&gt;:
&lt;/p&gt;
&lt;pre class="wiki"&gt;mysql&amp;gt; \s
--------------
mysql  Ver 14.14 Distrib 5.5.43, for debian-linux-gnu (x86_64) using readline 6.3
Connection id:          44
Current database:
Current user:           root@localhost
SSL:                    Not in use
Current pager:          stdout
Using outfile:          ''
Using delimiter:        ;
Server version:         5.5.43-0+deb8u1 (Debian)
Protocol version:       10
Connection:             Localhost via UNIX socket
Server characterset:    latin1
Db     characterset:    latin1
Client characterset:    utf8
Conn.  characterset:    utf8
UNIX socket:            /var/run/mysqld/mysqld.sock
Uptime:                 11 min 43 sec
Threads: 2  Questions: 133  Slow queries: 0  Opens: 181  Flush tables: 1  Open tables: 174  Queries per second avg: 0.189
--------------
&lt;/pre&gt;&lt;p&gt;
So we are using SSL for sure and can move onto &lt;a class="closed ticket" href="https://trac.crin.org/trac/ticket/6" title="task: Migrate Drupal site from GreenQloud (closed: fixed)"&gt;ticket:6&lt;/a&gt;.
&lt;/p&gt;
      </description>
      <category>Ticket</category>
    </item><item>
      
        <dc:creator>chris</dc:creator>

      <pubDate>Tue, 05 May 2015 10:04:18 GMT</pubDate>
      <title>hours, totalhours changed</title>
      <link>https://trac.crin.org/trac/ticket/8#comment:5</link>
      <guid isPermaLink="false">https://trac.crin.org/trac/ticket/8#comment:5</guid>
      <description>
          &lt;ul&gt;
            &lt;li&gt;&lt;strong&gt;hours&lt;/strong&gt;
                changed from &lt;em&gt;0&lt;/em&gt; to &lt;em&gt;0.25&lt;/em&gt;
            &lt;/li&gt;
            &lt;li&gt;&lt;strong&gt;totalhours&lt;/strong&gt;
                changed from &lt;em&gt;3.55&lt;/em&gt; to &lt;em&gt;3.8&lt;/em&gt;
            &lt;/li&gt;
          &lt;/ul&gt;
        &lt;p&gt;
It is important to have SSL/TLS encrypted MySQL traffic between the &lt;a class="wiki" href="https://trac.crin.org/trac/wiki/Crin2"&gt;Crin2&lt;/a&gt; webserver and the &lt;a class="wiki" href="https://trac.crin.org/trac/wiki/Crin1"&gt;Crin1&lt;/a&gt; database server as things like passwords and IP addresses will be stored in the database and with the traffic being encrypted it becomes an awful lot harder to snoop and/or interfere with it.
&lt;/p&gt;
&lt;p&gt;
The Cacert.org keys and certs are only valid for 2 years and I'm not sure if the connections will fail when they expire so we need to be sure to update them before two years is up, and there is a Debian package sepcifically designed to do this -- watch for expiry dates, so, on both servers:
&lt;/p&gt;
&lt;pre class="wiki"&gt;aptitude install ssl-cert-check
&lt;/pre&gt;&lt;p&gt;
On &lt;a class="wiki" href="https://trac.crin.org/trac/wiki/Crin1"&gt;Crin1&lt;/a&gt; this crontab was set up for the &lt;tt&gt;chris&lt;/tt&gt; user:
&lt;/p&gt;
&lt;pre class="wiki"&gt;30 09 * * * sudo ssl-cert-check -qac "/etc/ssl/cacert/crin1_cert.pem" -e "chris@webarchitects.co.uk"
&lt;/pre&gt;&lt;p&gt;
And the corresponding crontab on &lt;a class="wiki" href="https://trac.crin.org/trac/wiki/Crin2"&gt;Crin2&lt;/a&gt;:
&lt;/p&gt;
&lt;pre class="wiki"&gt;30 09 * * * sudo ssl-cert-check -qac "/etc/ssl/cacert/crin2_cert.pem" -e "chris@webarchitects.co.uk"
&lt;/pre&gt;&lt;p&gt;
The above means that every day at 9:30am the cert will be checked to see if they expire in less than 30 dayes and if they do then a email will be sent.
&lt;/p&gt;
&lt;p&gt;
It would also be worth setting up checks for the commercial certificates to go to a crin.org email address.
&lt;/p&gt;
      </description>
      <category>Ticket</category>
    </item><item>
      
        <dc:creator>chris</dc:creator>

      <pubDate>Thu, 07 May 2015 10:53:58 GMT</pubDate>
      <title>hours, status, totalhours changed; resolution set</title>
      <link>https://trac.crin.org/trac/ticket/8#comment:6</link>
      <guid isPermaLink="false">https://trac.crin.org/trac/ticket/8#comment:6</guid>
      <description>
          &lt;ul&gt;
            &lt;li&gt;&lt;strong&gt;hours&lt;/strong&gt;
                changed from &lt;em&gt;0&lt;/em&gt; to &lt;em&gt;0.17&lt;/em&gt;
            &lt;/li&gt;
            &lt;li&gt;&lt;strong&gt;status&lt;/strong&gt;
                changed from &lt;em&gt;new&lt;/em&gt; to &lt;em&gt;closed&lt;/em&gt;
            &lt;/li&gt;
            &lt;li&gt;&lt;strong&gt;resolution&lt;/strong&gt;
                set to &lt;em&gt;fixed&lt;/em&gt;
            &lt;/li&gt;
            &lt;li&gt;&lt;strong&gt;totalhours&lt;/strong&gt;
                changed from &lt;em&gt;3.8&lt;/em&gt; to &lt;em&gt;3.97&lt;/em&gt;
            &lt;/li&gt;
          &lt;/ul&gt;
        &lt;p&gt;
I have created  a wiki page at &lt;a class="wiki" href="https://trac.crin.org/trac/wiki/phpMyAdmin"&gt;wiki:phpMyAdmin&lt;/a&gt; and this ticket can now be closed.
&lt;/p&gt;
      </description>
      <category>Ticket</category>
    </item><item>
      
        <dc:creator>chris</dc:creator>

      <pubDate>Fri, 08 May 2015 12:43:48 GMT</pubDate>
      <title>hours, estimatedhours, totalhours changed</title>
      <link>https://trac.crin.org/trac/ticket/8#comment:7</link>
      <guid isPermaLink="false">https://trac.crin.org/trac/ticket/8#comment:7</guid>
      <description>
          &lt;ul&gt;
            &lt;li&gt;&lt;strong&gt;hours&lt;/strong&gt;
                changed from &lt;em&gt;0&lt;/em&gt; to &lt;em&gt;1.25&lt;/em&gt;
            &lt;/li&gt;
            &lt;li&gt;&lt;strong&gt;estimatedhours&lt;/strong&gt;
                changed from &lt;em&gt;0&lt;/em&gt; to &lt;em&gt;5.5&lt;/em&gt;
            &lt;/li&gt;
            &lt;li&gt;&lt;strong&gt;totalhours&lt;/strong&gt;
                changed from &lt;em&gt;3.97&lt;/em&gt; to &lt;em&gt;5.22&lt;/em&gt;
            &lt;/li&gt;
          &lt;/ul&gt;
        &lt;p&gt;
phpMyAdmin is available here &lt;a class="ext-link" href="https://phpmyadmin.crin1.webarch.net/"&gt;&lt;span class="icon"&gt;​&lt;/span&gt;https://phpmyadmin.crin1.webarch.net/&lt;/a&gt; but we want it at &lt;a class="ext-link" href="https://phpmyadmin.crin.org/"&gt;&lt;span class="icon"&gt;​&lt;/span&gt;https://phpmyadmin.crin.org/&lt;/a&gt; so a new DNS record was added and a csr generated for CAcert.org, first check what domain names we are using on the server:
&lt;/p&gt;
&lt;pre class="wiki"&gt;
grep "ServerAlias\|ServerName" /etc/apache2/sites-enabled/* | awk '{print $3}' | sort -u
  cloud.crin1.crin.org
  cloud.crin.org
  phpmyadmin.crin1.webarch.net
  phpmyadmin.crin.org
  stats.crin1.crin.org
  stats.crin.org
  trac.crin.org
  wiki.crin1.crin.org
  wiki.crin.org
  www.cloud.crin.org
  www.stats.crin.org
  www.wiki.crin.org
&lt;/pre&gt;&lt;p&gt;
Generate a csr:
&lt;/p&gt;
&lt;pre class="wiki"&gt;/root/bin/csr
  Private Key and Certificate Signing Request Generator
  This script was designed to suit the request format needed by
  the CAcert Certificate Authority. www.CAcert.org
  Short Hostname (ie. imap big_srv www2): crin1
  FQDN/CommonName (ie. www.example.com) : crin1.crin.org
  Type SubjectAltNames for the certificate, one per line. Enter a blank line to finish
  SubjectAltName: DNS:crin1.crin.org
  SubjectAltName: DNS:*.crin1.crin.org
  SubjectAltName: DNS:*.crin.org
  SubjectAltName: DNS:crin1.webarch.net
  SubjectAltName: DNS:*.crin1.webarch.net
  SubjectAltName: DNS:
  Running OpenSSL...
  Generating a 2048 bit RSA private key
  .......
&lt;/pre&gt;&lt;p&gt;
Save it as &lt;tt&gt;/root/crin1_privatekey.pem&lt;/tt&gt; generate a version for MySQL and move certs around:
&lt;/p&gt;
&lt;pre class="wiki"&gt;openssl rsa -in crin1_privatekey.pem -out crin1_yassl_privatekey.pem
cd /etc/ssl/cacert
mkdir old
mv crin1_* old/
mv /root/crin1_* .
chmod 640 crin1_*
chown root:mysql crin1_*
&lt;/pre&gt;&lt;p&gt;
Do the same on &lt;a class="wiki" href="https://trac.crin.org/trac/wiki/Crin2"&gt;Crin2&lt;/a&gt;:
&lt;/p&gt;
&lt;pre class="wiki"&gt;cd /root/bin
wget http://svn.cacert.org/CAcert/Software/CSRGenerator/csr
chmod 700 csr
./csr
  Private Key and Certificate Signing Request Generator
  This script was designed to suit the request format needed by
  the CAcert Certificate Authority. www.CAcert.org
  Short Hostname (ie. imap big_srv www2): crin2
  FQDN/CommonName (ie. www.example.com) : crin2.crin.org
  Type SubjectAltNames for the certificate, one per line. Enter a blank line to finish
  SubjectAltName: DNS:crin2.crin.org
  SubjectAltName: DNS:*.crin2.crin.org
  SubjectAltName: DNS:*.crin.org
  SubjectAltName: DNS:crin2.webarch.net
  SubjectAltName: DNS:*.crin2.webarch.net
  SubjectAltName: DNS:
  Running OpenSSL...
  Generating a 2048 bit RSA private key
  .......
&lt;/pre&gt;&lt;p&gt;
Save it as &lt;tt&gt;/root/crin2_privatekey.pem&lt;/tt&gt; generate a version for MySQL and move certs around:
&lt;/p&gt;
&lt;pre class="wiki"&gt;cd
openssl rsa -in crin2_privatekey.pem -out crin2_yassl_privatekey.pem
cd /etc/ssl/cacert
mkdir old
mv crin1_* old/
mv /root/crin2_* .
chmod 640 crin2_*
chown root:www-data crin2_*
&lt;/pre&gt;&lt;p&gt;
Sync files via &lt;a class="wiki" href="https://trac.crin.org/trac/wiki/Crin1"&gt;Crin1&lt;/a&gt; after copying the root public ssh keys between servers, on &lt;a class="wiki" href="https://trac.crin.org/trac/wiki/Crin1"&gt;Crin1&lt;/a&gt; and &lt;a class="wiki" href="https://trac.crin.org/trac/wiki/Crin2"&gt;Crin2&lt;/a&gt; edit &lt;tt&gt;/root/.ssh/config&lt;/tt&gt; and add:
&lt;/p&gt;
&lt;pre class="wiki"&gt;Host crin1
  User root
  Hostname crin1.crin.org
Host crin2
  User root
  Hostname crin2.crin.org
&lt;/pre&gt;&lt;p&gt;
Copy the public key from each server to the &lt;tt&gt;/root/.ssh/authorized_keys&lt;/tt&gt; file on each server and limit the IP address from which connections are allowed:
&lt;/p&gt;
&lt;pre class="wiki"&gt;from="93.95.228.180" ssh-rsa AAAA...
&lt;/pre&gt;&lt;p&gt;
Edit the &lt;tt&gt;/etc/ssh/sshd_config&lt;/tt&gt; files on each server, changing:
&lt;/p&gt;
&lt;pre class="wiki"&gt;#PermitRootLogin no
PermitRootLogin without-password
AllowGroups sudo root
&lt;/pre&gt;&lt;p&gt;
Restart &lt;tt&gt;service ssh restart&lt;/tt&gt; and check the connections and the ssh fingerprints.
&lt;/p&gt;
&lt;p&gt;
Sync the files:
&lt;/p&gt;
&lt;pre class="wiki"&gt;rsync -av /etc/ssl/cacert/crin1* crin2:/etc/ssl/cacert/
rsync -av crin2:/etc/ssl/cacert/crin2* /etc/ssl/cacert/
&lt;/pre&gt;&lt;p&gt;
Chown the files on &lt;a class="wiki" href="https://trac.crin.org/trac/wiki/Crin1"&gt;Crin1&lt;/a&gt;:
&lt;/p&gt;
&lt;pre class="wiki"&gt;chown root:mysql crin2*
&lt;/pre&gt;&lt;p&gt;
&lt;a class="wiki" href="https://trac.crin.org/trac/wiki/Crin2"&gt;Crin2&lt;/a&gt;:
&lt;/p&gt;
&lt;pre class="wiki"&gt;chown root:www-data crin1_*
&lt;/pre&gt;&lt;p&gt;
Copy &lt;a class="wiki" href="https://trac.crin.org/trac/wiki/Crin2"&gt;Crin2&lt;/a&gt; Nginx config and edit for crin2.crin.org changing the &lt;tt&gt;server_name&lt;/tt&gt; and SSL:
&lt;/p&gt;
&lt;pre class="wiki"&gt;        listen 80;
        listen 443 ssl;
        server_name crin2.crin.org;
        ssl_certificate     /etc/ssl/cacert/crin2_cert.chained.pem;
        ssl_certificate_key /etc/ssl/cacert/crin2_privatekey.pem
&lt;/pre&gt;&lt;p&gt;
Generate a chained cert:
&lt;/p&gt;
&lt;pre class="wiki"&gt;cat crin2_cert.pem &amp;gt; crin2_cert.chained.pem
cat cacert.pem &amp;gt;&amp;gt; crin2_cert.chained.pem
chown root:www-data crin2_cert.chained.pem
&lt;/pre&gt;&lt;p&gt;
Enable the new Nginx config:
&lt;/p&gt;
&lt;pre class="wiki"&gt;cd /etc/nginx/sites-enabled
ln -s ../sites-available/crin2.crin.org 10-crin2.crin.org.conf
service nginx configtest
service niginx restart
&lt;/pre&gt;&lt;p&gt;
And we now have a CAcert.org secure site at &lt;a class="ext-link" href="https://crin2.crin.org/"&gt;&lt;span class="icon"&gt;​&lt;/span&gt;https://crin2.crin.org/&lt;/a&gt; and when the dns has updated &lt;a class="ext-link" href="https://phpmyadmin.crin.org/"&gt;&lt;span class="icon"&gt;​&lt;/span&gt;https://phpmyadmin.crin.org/&lt;/a&gt; should work, the 1984.is servers have updated:
&lt;/p&gt;
&lt;pre class="wiki"&gt;dig @ns0.1984.is phpmyadmin.crin.org +short
  93.95.228.179
dig @ns1.1984.is phpmyadmin.crin.org +short
  93.95.228.179
dig @ns2.1984.is phpmyadmin.crin.org +short
  93.95.228.179
dig @ns2.1984hosting.com phpmyadmin.crin.org +short
  93.95.228.179
&lt;/pre&gt;
      </description>
      <category>Ticket</category>
    </item><item>
      
        <dc:creator>chris</dc:creator>

      <pubDate>Fri, 08 May 2015 12:54:11 GMT</pubDate>
      <title>hours, totalhours changed</title>
      <link>https://trac.crin.org/trac/ticket/8#comment:8</link>
      <guid isPermaLink="false">https://trac.crin.org/trac/ticket/8#comment:8</guid>
      <description>
          &lt;ul&gt;
            &lt;li&gt;&lt;strong&gt;hours&lt;/strong&gt;
                changed from &lt;em&gt;0&lt;/em&gt; to &lt;em&gt;0.1&lt;/em&gt;
            &lt;/li&gt;
            &lt;li&gt;&lt;strong&gt;totalhours&lt;/strong&gt;
                changed from &lt;em&gt;5.22&lt;/em&gt; to &lt;em&gt;5.32&lt;/em&gt;
            &lt;/li&gt;
          &lt;/ul&gt;
        &lt;p&gt;
I can't see why &lt;a class="ext-link" href="https://phpmyadmin.crin.org/"&gt;&lt;span class="icon"&gt;​&lt;/span&gt;https://phpmyadmin.crin.org/&lt;/a&gt; isn't working, have changed the documentation to point to &lt;a class="ext-link" href="https://phpmyadmin.crin1.crin.org/"&gt;&lt;span class="icon"&gt;​&lt;/span&gt;https://phpmyadmin.crin1.crin.org/&lt;/a&gt; at &lt;a class="wiki" href="https://trac.crin.org/trac/wiki/phpMyAdmin"&gt;wiki:phpMyAdmin&lt;/a&gt; and &lt;a class="wiki" href="https://trac.crin.org/trac/wiki/WikiStart#ServicesandApplications"&gt;wiki:WikiStart#ServicesandApplications&lt;/a&gt;.
&lt;/p&gt;
      </description>
      <category>Ticket</category>
    </item><item>
      
        <dc:creator>chris</dc:creator>

      <pubDate>Mon, 11 May 2015 08:54:21 GMT</pubDate>
      <title>hours, totalhours changed</title>
      <link>https://trac.crin.org/trac/ticket/8#comment:9</link>
      <guid isPermaLink="false">https://trac.crin.org/trac/ticket/8#comment:9</guid>
      <description>
          &lt;ul&gt;
            &lt;li&gt;&lt;strong&gt;hours&lt;/strong&gt;
                changed from &lt;em&gt;0&lt;/em&gt; to &lt;em&gt;0.1&lt;/em&gt;
            &lt;/li&gt;
            &lt;li&gt;&lt;strong&gt;totalhours&lt;/strong&gt;
                changed from &lt;em&gt;5.32&lt;/em&gt; to &lt;em&gt;5.42&lt;/em&gt;
            &lt;/li&gt;
          &lt;/ul&gt;
        &lt;p&gt;
Replying to &lt;a class="ticket" href="https://trac.crin.org/trac/ticket/8#comment:8" title="Comment 8"&gt;chris&lt;/a&gt;:
&lt;/p&gt;
&lt;blockquote class="citation"&gt;
&lt;p&gt;
I can't see why &lt;a class="ext-link" href="https://phpmyadmin.crin.org/"&gt;&lt;span class="icon"&gt;​&lt;/span&gt;https://phpmyadmin.crin.org/&lt;/a&gt; isn't working, have changed the documentation to point to &lt;a class="ext-link" href="https://phpmyadmin.crin1.crin.org/"&gt;&lt;span class="icon"&gt;​&lt;/span&gt;https://phpmyadmin.crin1.crin.org/&lt;/a&gt; at &lt;a class="wiki" href="https://trac.crin.org/trac/wiki/phpMyAdmin"&gt;wiki:phpMyAdmin&lt;/a&gt; and &lt;a class="wiki" href="https://trac.crin.org/trac/wiki/WikiStart#ServicesandApplications"&gt;wiki:WikiStart#ServicesandApplications&lt;/a&gt;.
&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;
It must just heving been taking time for the DNS to update, it's working now at &lt;a class="ext-link" href="https://phpmyadmin.crin.org/"&gt;&lt;span class="icon"&gt;​&lt;/span&gt;https://phpmyadmin.crin.org/&lt;/a&gt; and the wiki pages &lt;a class="wiki" href="https://trac.crin.org/trac/wiki/phpMyAdmin"&gt;wiki:phpMyAdmin&lt;/a&gt; and &lt;a class="wiki" href="https://trac.crin.org/trac/wiki/WikiStart#ServicesandApplications"&gt;wiki:WikiStart#ServicesandApplications&lt;/a&gt; have been updated.
&lt;/p&gt;
      </description>
      <category>Ticket</category>
    </item><item>
      
        <dc:creator>chris</dc:creator>

      <pubDate>Thu, 18 Jun 2015 11:59:04 GMT</pubDate>
      <title>cc changed</title>
      <link>https://trac.crin.org/trac/ticket/8#comment:10</link>
      <guid isPermaLink="false">https://trac.crin.org/trac/ticket/8#comment:10</guid>
      <description>
          &lt;ul&gt;
            &lt;li&gt;&lt;strong&gt;cc&lt;/strong&gt;
              &lt;em&gt;jenny&lt;/em&gt; &lt;em&gt;gillian&lt;/em&gt; added; &lt;em&gt;jonas&lt;/em&gt; removed
            &lt;/li&gt;
          &lt;/ul&gt;
        &lt;p&gt;
CCs changed.
&lt;/p&gt;
      </description>
      <category>Ticket</category>
    </item>
 </channel>
</rss>