> ## Content Index
> Fetch the complete content index at: https://blog.esadax.com/llms.txt
> Use this file to discover other available public pages before exploring further.

# Generating a CSR and Installing SSL on AWS AMI Linux Instance
- URL: https://blog.esadax.com/en/generating-a-csr-and-installing-ssl-on-aws-ami-linux-instance/
- Published: 2026-11-15T04:16:11.000Z
- Updated: 2026-11-15T04:16:11.000Z
- Author: Esadax 
- Tags: #tr-faq-06-ssl-generating-a-csr-on-amazon-web-services-aws, #en, #mdx-imported, FAQ

To install an SSL certificate on your Amazon AMI Linux instance, follow these organized steps:

  - Create a configuration file (`example.com.cnf`) with your domain details.
  - Generate the CSR and private key:
1. **Submit CSR to Certificate Authority (CA)**:
  - Upload `csr.pem` to your CA provider (e.g., Esadax) to obtain certificate files.
  - Create a temporary key for installation:
  - Ensure the temp key is securely managed and removed after use.
2. **Restart Relevant Services**:
  - For Nginx: `sudo nginx -s reload`
  - For Apache: `sudo systemctl reload apache2`
3. **Verify SSL Installation**:
  - Use `openssl s_client` to check the certificate and ensure it's trusted.

**Set Permissions**:

```bash
chmod 600 privateKey.pem
chmod 600 temp.pem

```

**Install SSL Certificate on Linux Instance**:

```bash
sudo openssl x509 -req -in server.crt -key -out temp.pem -days 365 -nodes

```

**Combine Certificate and Private Key**:

```bash
cat privateKey.pem certificate.pem > server.crt

```

**Generate CSR and Private Key**:

```bash
echo '[NewRequest]' > example.com.cnf
echo 'Subject = "/C=US/ST=CA/L=Mountain View/O=My Company/OU=IT/CN=myserver"' >> example.com.cnf
echo 'Exportable = TRUE' >> example.com.cnf
echo 'KeyLength = 2048' >> example.com.cnf
echo 'KeySpec = 1' >> example.com.cnf
echo 'KeyUsage = 0xf0' >> example.com.cnf
echo 'MachineKeySet = TRUE' >> example.com.cnf

```

```bash
openssl req -key privateKey.pem -out csr.pem -reqext -config example.com.cnf

```