Welcome to Centmin Mod Community
Register Now

Nginx Install self signed certificate after vhost is created?

Discussion in 'Nginx, PHP-FPM & MariaDB MySQL' started by pamamolf, Mar 10, 2016.

  1. pamamolf

    pamamolf Well-Known Member

    2,722
    242
    63
    May 31, 2014
    Ratings:
    +433
    Local Time:
    12:02 PM
    Nginx-1.13.x
    MariaDB 10.1.x
    Hi

    Is it possible to install the self signed certificate after the creation of vhost as i forgot to enable it and now the site is active and not easy to recreate the vhost ?

    Thanks
     
  2. eva2000

    eva2000 Administrator Staff Member

    30,160
    6,784
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,135
    Local Time:
    7:02 PM
    Nginx 1.13.x
    MariaDB 5.5
    of course it's possible if you know how to do it manually :)

    or just use official site's nginx vhost generator, enter domain name and check the self-signed ssl box to generate the instructions for manually doing it at Generate Centmin Mod Nginx Vhost - CentminMod.com LEMP Nginx web stack for CentOS

    the generated nginx vhost is slightly different as it's for 123.08stable not 123.09beta01

    or use official site generator for manual self-signed ssl setup but just use setup a dummy new nginx vhost with dummy domain and yes to self-signed ssl, then copy and paste that nginx domain.com.ssl.conf format only (not ssl files) itself to your existing site and search and replace the domain name and then remove the dummy new nginx vhost
     
    Last edited: Mar 10, 2016
    • Like Like x 1
  3. pamamolf

    pamamolf Well-Known Member

    2,722
    242
    63
    May 31, 2014
    Ratings:
    +433
    Local Time:
    12:02 PM
    Nginx-1.13.x
    MariaDB 10.1.x
    I will get a vps today for some centminmod tests so i will create a vhost with ssl and then i replace the domain with my other one that i want to use and i will try to install it there :)

    Nice and easy !

    I just ask because i didn't know if the ssl vhost file is enough or any other files/ settings needed to copy also :)