Menu
picture of tbs certificates
picture of tbs certificates
Certificates
Our products range
Partners
Support
Focus


Generate a CSR for Apache release 2 OVH (base gentoo)

New: Use our command line generator

In order to gain some time, you can now generate your command line with our CSR creation assistant tool. Just copy/paste to finalize !

Generate the private key

  • Connect under root and access the setup directory of your Apache server.
    cd /etc/httpd/ssl.key

    or
    cd /usr/local/apache/conf/ssl.key

    If needed, create it, ie:
    mkdir /etc/httpd/ssl.csr ; cd /etc/httpd/ssl.csr
  • Choose a file's name that fits you and generate the key with the following command:
    openssl genrsa 2048 > www.example.com.key
  • If you want this key to be protected by a password (that will be requested any time you'll restart Apache), add:
    "-des3"  
    after "genrsa").
  • You can also enhance the quality of your key. To do so, add the instructions below after "genrsa":

    "-rand /var/log/messages".

    It enables random numbers to be used.

Make a backup copy of the .key file!

  • Protect your file with:
    chmod 400 www.example.com.key

Create your certificate request (CSR)

  • Go to the CSR directory or create one with:
    mkdir /etc/httpd/ssl.csr ; cd /etc/httpd/ssl.csr
  • Use this command to generate the CSR:
    openssl req -new -key ../ssl.key/www.example.com.key > www.example.com.csr
  • The system will then ask you to fill in fields. To do so respect the instructions provided on the page Obtain a server certificate

    Country Name (2 letter code) []: (FR for France)
    State or Province Name (full name) [Some-State]
    Locality Name (eg, city) []
    Organization Name (eg, company) []
    Organizational Unit Name (eg, section) []: (anything you want)
    Common Name (eg, YOUR name) []: (the name of the website to be secured)
    Email Address []: (let blank)

3- Finalize the order process

  • Use the appropriate link to place your order on our website. See Access an order form
  • Copy/paste the content of the www.exemple.com.csr file in the form.