How to Generate a CSR for Apache2 via Command Line (No Web Interface Required)
If you're running an Apache2 server without a graphical control panel (such as cPanel), you can generate a Certificate Signing Request (CSR) directly via the command line using SSH.
1. Access the Server via SSH
Use an SSH client (e.g., PuTTY or terminal) to connect to the server where the SSL certificate will be installed.
2. Run the CSR Generation Command
Enter the following command:
openssl req -new -newkey rsa:2048 -nodes -keyout domain.key -out domain.csr
Replace domain
with your actual domain name (e.g., example.com
). This will generate two files:
- domain.key → your private key
- domain.csr → your CSR file
3. Provide the Required Information
After running the command, you'll be prompted to enter the following information:
- Common Name (CN): the fully qualified domain name (e.g.,
www.example.com
) - Wildcard: for wildcard certificates, use
*.example.com
- Organization (O): your legally registered company name
- Organizational Unit (OU): department or trade name (optional)
- City/Locality (L): full city name (no abbreviations)
- State/Province (S): full state or province name (no abbreviations)
- Country (C): two-letter ISO country code (e.g.,
US
,IT
)
4. Copy and Paste the CSR into the SSL Request Form
Open the domain.csr
file in a text editor (such as nano
, vim
, or via FTP download), then copy the entire content including the headers:
-----BEGIN CERTIFICATE REQUEST----- [base64-encoded content] -----END CERTIFICATE REQUEST-----
Paste the full content into your SSL request form on the Utixo platform or with your certificate provider.