Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Before replacing any of these files, make a backup of the current files in case they should ever need to be replaced. There is no way to recover the files. Just like MacPractice backups, the files should also be stored somewhere beyond just the MacPractice Server in case of machine failure.

 

To replace the files, make a backup of the the existing server-cert.pem and place the new certificate within /Library/MacPracticeServer/Apache/Security/public. Some Certificate Authorities will send the public key as text pasted within the email. This text can be copied and pasted to a blank text file to create the server certificate. Name this file server-cert.pem, and install the file in /Library/MacPracticeServer/Apache/Security/public. 

Next, to install the Intermediate Certificate, copy and paste the text of the intermediate certificate to a blank text file. Name this file server-ca.crt, and install the file to /Library/MacPracticeServer/Apache/conf/.

 

The server-key.pem file, which was created during the CSR process, will need to be installed to /Library/MacPracticeServer/Apache/Security/private on MacPractice versions previous to 4.2.18. Later versions of MacPractice will have created this 2048 bit key file directly within the location, and manually replacement is not needed.

 

These files will need the proper permissions. Both files should have the following owner, group, and permissions set:

 

-rw-r--r--  1 _macpractice  admin 

To check the permissions, type the following in Terminal: 

To check the certificate

sudo chmod 644 /Library/MacPracticeServer/Apache/Security/public/server-cert.pem sudo chown _macpractice:admin /Library/MacPracticeServer/Apache/Security/public/server-cert.pem 

To check the key
sudo chmod 644 /Library/MacPracticeServer/Apache/Security/private/server-key.pemsudo chown _macpractice:admin /Library/MacPracticeServer/Apache/Security/private/server-key.pem

Next, edit the config file to recognize the domain of your MacPractice Server. The MacPracticeServer.conf file is located in /Library/MacPracticeServer/Apache/conf . Open this file in TextWranger or TextEdit and look for the following line:

 

ServerName MacPracticeServer:1234

 

In this line, replace the "MacPracticeServer" with the full domain name of the server. This must match both the domain name of the server and the domain name for which the certificate was verified. 

Next, three host sections will need to be edited to point to the three new certificate files. Within the same MacPracticeServer.conf file, locate the virtual host section. This section points to the server certificate, private key, and certificate chain. The following lines will need to be edited within the file:

...