SSL SAN Certificate for Apache server
If you want to create a SSL Certificate you need to run the below commands.
STEP: Generate Private Key
Crete a folder in C Drive
mkdir ~/certs cd ~/certs
This is on the Windows server where you want to create the certificate
Open OpenSSL you need to install it in Windows server.
open OpenSSL Command prompt and run the below command
Create the key and place in a file:
openssl genrsa -out www.contoso.com.key 2048
In the above command change the website to your website to which your creating the Certificate
the Certs folder the key file will be generated.
Before creating the CSR create a new file in the Certs folder with the below details and rename it as Contoso.cnf
mentioned in it
[req]
default_bits = 2048
prompt = no
default_md = sha256
req_extensions = req_ext
distinguished_name = dn
[dn]
C = GB
ST = Greater Manchester
L = Salford
O = contoso
OU = IT
CN = contoso.com
[req_ext]
subjectAltName = @alt_names
[alt_names]
DNS.1 = www.contoso.com
then create the CSR so that the web server details the correct detials this is a very important step so dont forget it.
STEP: Generate CSR
Run the below command to create the CSR
openssl req -new -sha256 -key "C:\certs\www.Contoso.com.key" -out "C:\certs\www.contoso.com.csr" -config "C:\certs\www.contoso.com.cnf"
The above command will create the CSR then run the below command to generate the Certificate. If you don't know your domain CA server you can try this command and it will show your internal CA server you just click OK and the certificate ill be generated.
Note: The below Command needs to be run in Windows Command Prompt.
certreq -submit -attrib "CertificateTemplate:WebServer" "C:\certs\www.contoso.com.csr" "C:\certs\www.contoso.com.cer"
Once you run the command the certificate will be created which you can provide to your UNIX Team or Application Team,
The Data is taken from the below Microsoft Website.
Configure Apache HTTPD Certificates w/ Microsoft ADCS | Revocent
Comments