Join the community today
Become a Member

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 Premium Member Premium Member

    4,086
    428
    83
    May 31, 2014
    Ratings:
    +834
    Local Time:
    12:04 PM
    Nginx-1.25.x
    MariaDB 10.3.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

    54,860
    12,239
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,810
    Local Time:
    8:04 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    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
  3. pamamolf

    pamamolf Premium Member Premium Member

    4,086
    428
    83
    May 31, 2014
    Ratings:
    +834
    Local Time:
    12:04 PM
    Nginx-1.25.x
    MariaDB 10.3.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 :)