How to move an SSL Certificate from one Server to Another – EuroVPS FAQ (2024)

Introduction

Sometimes it is required to transfer your domains from one server to another and a related concern that often arise is, What to do with the SSL certificates?. Yes, it is possible to transfer SSL certificates used with the domain in one server to another along with the domain. Interestingly, it is possible to transfer the certificates used with your Linux/Apache/nginx servers to a Windows/IIS server and vice versa. Every server require its SSL certificate in a specific format for the server to process it, the Windows/IIS setup require the SSL in .pfx format but the Linux/Apache or Nginx servers require the certificate in .crt format and other servers like Haproxy require it in .pem format. All you need to do is export the certificates from its currently installed server and convert them to the correct certificate format as per the destination server requirement. Make sure you are exporting the certificates with its private key and any intermediate certificates used along with that certificate. We are going to discuss the exporting of SSL certificates from different server types, their conversion and installation of the converted certificates in their destination.

#1Moving an SSL certificate from one IIS server to another IIS server.

This is a pretty straight forward operation as no SSL conversion is required since both the servers are IIS which use the same .pfx format for its certificates. The steps are as described below.

1.)Open IIS as administrator and find the “Server Certificates” option from the Home window

How to move an SSL Certificate from one Server to Another – EuroVPS FAQ (1)

2.)Select the certificate that you want to export from the list, right click on it and click the Export option. You will see the common name to which the certificate issued, the issuer of the certificate, its expiration date etc in this window.

How to move an SSL Certificate from one Server to Another – EuroVPS FAQ (2)

3.)The selected export will ask you for the destination directory location for the exported certificates and a password for protecting the exported certificates. Please note down the password if you are using once since it will be required at the time of importing these certificates to another server.

How to move an SSL Certificate from one Server to Another – EuroVPS FAQ (3)

4.)Copy the certificate from its exported location and move it to a location in your destination IIS server. Open IIS in your destination server as administrator, open “Server Certificates” from the Home screen options and select the import option from left side pane. Browse and select the certificate file from its location, provide the password that you used to export the certificate from the other server, click ‘Ok’. This will import the certificate to IIS and it will be listed in server certificates.

How to move an SSL Certificate from one Server to Another – EuroVPS FAQ (4)

5.)Now you can proceed installing this imported certificate for your domain. Open IIS with administrator privileges, expand the “Sites”, click on the website to which you want to install the certificate. Click on ‘Bindings’ from the left side pane, click on ‘Add’ button, Select the imported SSL certificate from the dropdownliast, add host name and click ‘Ok’ button.

Restart the website from the left pane ‘Manage Web Site’ option.

How to move an SSL Certificate from one Server to Another – EuroVPS FAQ (5)

#2 Copying SSL From a Windows/IIS Server to Linux/Apache Server

1.)Export the certificates from the Windows IIS server as described in the above tutorial (steps 1, 2 and 3)

2.)Copy the exported .pfx certificate from the Windows server to the Linux server. You can use applications like WinSCP, or FTP service in Linux server to transfer the certificates.

3.)Open the command terminal in Linux server and execute the below command to convert the .pfx certificate to the .crt and private key format.

 openssl pkcs12 -in eurovps.pfx -out testconvert.txt -nodes

** replace testexport.pfx with the filename of your exported .pfx file and replace testconvert.txt with the filename that you want to use for the converted certificate file.

How to move an SSL Certificate from one Server to Another – EuroVPS FAQ (6)

The converted .txt file will have two parts, the private key section and the certificate section. Copy the text included in —–BEGIN PRIVATE KEY—– to —–END PRIVATE KEY—– to another file and name it as the domain.key file. Copy the text included in —–BEGIN CERTIFICATE—– to —–END CERTIFICATE—– to another file and name it as domain.crt. These are the private key and certificate for the domain that you can install directly in Apache, Nginx or from a control panel like Plesk/cPanel etc. If the command line conversion is difficult, you can use an online SSL converter likehttps://www.sslshopper.com/ssl-converter.html.

#3 Copy SSL Certificates from an Apache Server to Another Apache Server.

1.)You can find the SSL certificate file location in the source server from its Apache configuration file.The Apache config is normally available in any of the below locations.

/etc/apache2/conf/httpd.conf

 /etc/httpd/conf/httpd.conf/etc/apache2/apache2.conf/etc/httpd/httpd.conf

You can also use the the command ‘httpd -V’ from terminal and it will list the loaded configuration file for Apache.

How to move an SSL Certificate from one Server to Another – EuroVPS FAQ (7)

2.)Open the Apache configuration file in your favourite text editor and locate the virtual host section for the domain. The virtual host for the domain can be identified by searching the ‘ServerName’ directive. If you are looking for the virtual host of domain.com, its virtual host will have the ServerName entry as shown below.

ServerName domain.com

All the virtual host directives of domain.com will be with in the virtualhost tags like shown below.

<VirtualHost 123.456.789.10:443>

ServerName domain.com

ServerAlias www.domain.com mail.domain.com

DocumentRoot /var/ww/html/domain.com

SSLEngine on

SSLCertificateFile /etc/ssl/crt/primary.crt

SSLCertificateKeyFile /etc/ssl/crt/private.key

SSLCertificateChainFile /etc/ssl/crt/intermediate.crt

…..

….

..

.

</VirtualHost>

Identify the SSLCertificateFile, SSLCertificateKeyFile and SSLCertificateChainFile locations from the domain’s virtualhost, copy the files from these locations and move them to same or a custom location in the destination server. Modify the domain’s Apache virtualhost entry in destination server with SSLCertificateFile, SSLCertificateKeyFile and SSLCertificateChainFile wirth the certificate location.

Test Apache configuration syntax (apachectl configtest) and reload the Apache configuration (service httpd reload) to load the newly added SSL for the domain.

#4 Copying SSL certificates from Linux/Apache Server to Windows IIS Server

1.) Identify the file locations of SSLCertificateFile, SSLCertificateKeyFile and SSLCertificateChainFile from the Apache virtualhost for the domain.(refer #3.1 and #3.2)

2.)Copy the files to a test directory in server.

mkdir /root/ssl/

cp /etc/ssl/crt/primary.crt /root/ssl/primary.crt

cp /etc/ssl/crt/private.key /root/ssl/private.key

cp /etc/ssl/crt/intermediate.crt /root/ssl/intermediate.crt

3.) Use the below noted openssl command to convert the certificates and key to the .pfx format.

openssl pkcs12 -export -out eurovpstest.pfx -inkey /root/ssl/private.key -in /root/ssl/primary.crt -certfile /root/ssl/intermediate.crt

Replace eurovpstest.pfx with the filename that you prefer.

After converting the files, upload them to the Windows server using FTP and import it to IIS as described in #1.4 and #1.5

How to move an SSL Certificate from one Server to Another – EuroVPS FAQ (2024)
Top Articles
XRP Price Today - XRP Coin Price Chart & Crypto Market Cap
Your reviews from Hosts - Airbnb Help Centre
Amwednesday Vimeo
Pikes Suwanee
El Puerto Harrisonville Mo Menu
Southeast Iowa Buy Sell Trade
Comment créer et interpréter un tracé Q-Q dans R - Statorials
Binghamton Legacy Obits
Craigslist Free Stuff Fairfield County
Norris Funeral Home Chatham Va Obituaries
Alle koopwoningen van C&R Makelaars
Watermarke Tower Shooting
Standard Page Field
Hrconnect Kp Login
Hingham Police Scanner Wicked Local
Fine Taladorian Cheese Platter
‘Mom is sleeping,’ victim’s child said at Long Branch murder scene, witness testifies
Lauren Simonetti Biography: Spouse, Age, Wikipedia, Net Worth, Height, Instagram, Facebook, LinkedIn, Salary, Family, Without Makeup | TheCityCeleb
Jaheira, Friend of the Forest
Cryoaudiovascularmalexia
A Far Eastern Yarn Ffxiv
Steve Hytner Net Worth
Oldeuboi Showtimes Near Marcus Ronnie's Cinema
Braulio Babo Castellanos
Synthesis: Faculty AI Literacy Assessment
Chets Rental Chesterfield
Bmo Branch Near Me
Scooter Tramps And Beer
Hardest Game Unblocked Games
Dallas Cowboys On Sirius Xm Radio
Understanding the Brand Architecture of Proctor & Gamble (P&G)
Eulogy Zero Ror2
Weilers Gentle Giants
Ll Flooring Locations
What Day Is May 12 2023
Retrogames.cc Unblocked
Fake Snaps Summer
Nueces County Jail Inmate Search Vinelink
Infinite Campus Farmingdale
Florida Atlantic University
Math Nation Algebra 2 Practice Book Answer Key
55 Farmer-Approved Recipes
Randash Belgrade
Yonajilboobsr
Mature Juggs
Town Of Kearny Recycling Calendar
Canada Life Insurance Comparison Ivari Vs Sun Life
Edison 10K Watt Party System Manual
The Voice Season 22 Wiki
Samanthaschwartz Fapello
Ge Tracker Saturated Heart
Osu Worday
Latest Posts
Article information

Author: Cheryll Lueilwitz

Last Updated:

Views: 6383

Rating: 4.3 / 5 (54 voted)

Reviews: 85% of readers found this page helpful

Author information

Name: Cheryll Lueilwitz

Birthday: 1997-12-23

Address: 4653 O'Kon Hill, Lake Juanstad, AR 65469

Phone: +494124489301

Job: Marketing Representative

Hobby: Reading, Ice skating, Foraging, BASE jumping, Hiking, Skateboarding, Kayaking

Introduction: My name is Cheryll Lueilwitz, I am a sparkling, clean, super, lucky, joyous, outstanding, lucky person who loves writing and wants to share my knowledge and understanding with you.