My Favorites

Close

Please to see your favorites.

  • Bookmark
  • Email Document
  • Printer Friendly
  • Favorite
  • Rating:

Replacing an expired apache2 certificate when using mod_nss

This document (7022944) is provided subject to the disclaimer at the end of this document.

Environment

SUSE Linux Enterprise Server 11 Service Pack 3 (SLES 11 SP3)
SUSE Linux Enterprise Server 11 Service Pack 4 (SLES 11 SP4)

Situation

Original certificate in mod_nss database has expired.  New certificate has been issued but has not been set up with mod_nss for apache2.

Resolution

1. Back up the original mod_nss.d directory

hostname:~ # cd /etc/apache2
hostname:/etc/apache2 # mv mod_nss.d mod_nss.d-$(date +%y%m%d)

2. Create new mod_nss.d directory

hostname:/etc/apache2 # mkdir mod_nss.d

3. Generate new NSS certificate store in mod_nss.d directory.  Do not create a password

hostname:/etc/apache2 # certutil -N -d mod_nss.d

4. Change ownership recursively for that directory to wwwrun user and www group. 

hostname:/etc/apache2 # chown -R wwwrun:www mod_nss.d

5. Convert the certificate and key into PKCS12 format

hostname:/etc/apache2 # openssl pkcs12 -export -in /path/to/certificate -inkey /path/to/key -out server.p12 -n "server-cert" -passout pass:<password to encrypt key>

6.
a) Import the PKCS12 certificate

hostname:/etc/apache2 # pk12util -i server.p12 -d mod_nss.d

b) Import the CA chain

hostname:/etc/apache2 # certutil -A -n "ca-chain" -t "CT,," -d mod_nss.d -a -i /path/to/ca-chain


7.  Verify the certificate and CA are imported

hostname:/etc/apache2 # certutil -L -d mod_nss.d

8. Verify the NSSNickName in the existing /etc/apache2/vhosts.d/vhost-nss.conf reflects the Server certificate name in the database.  This parameter is case-sensitive.  Update as required. 

9. Restart apache2 service

hostname:/etc/apache2 # rcapache2 restart

Additional Information

See complete mod_nss documentation in /usr/share/doc/packages/apache2-mod_nss/mod_nss.html for details and more information.

Disclaimer

This Support Knowledgebase provides a valuable tool for NetIQ/Novell/SUSE customers and parties interested in our products and solutions to acquire information, ideas and learn from one another. Materials are provided for informational, personal or non-commercial use within your organization and are presented "AS IS" WITHOUT WARRANTY OF ANY KIND.

  • Document ID:7022944
  • Creation Date:10-MAY-18
  • Modified Date:19-NOV-18
    • SUSESUSE Linux Enterprise Server

Did this document solve your problem? Provide Feedback

< Back to Support Search

SUSE Support Forums

Get your questions answered by experienced Sys Ops or interact with other SUSE community experts.

Join Our Community

Support Resources

Learn how to get the most from the technical support you receive with your SUSE Subscription, Premium Support, Academic Program, or Partner Program.


SUSE Customer Support Quick Reference Guide SUSE Technical Support Handbook Update Advisories
Support FAQ

Open an Incident

Open an incident with SUSE Technical Support, manage your subscriptions, download patches, or manage user access.

Go to Customer Center