Create certification for 2nd domain in the same server

My domain is: blog.hoozing.com

I ran this command:sudo /opt/bitnami/letsencrypt/lego --tls --email="hieu.le@hoozing.com" --domains="blog.hoozing.com" --path="/opt/bitnami/letsencrypt" run

It produced this output:

I have the first domain is blog.hoozing.vn and it is in use for SSL, I want to generate SSL for my 2nd is blog.hoozing.com by upper command. But it says 443 is in used

My web server is (include version): nginx

The operating system my web server runs on is (include version):

My hosting provider, if applicable, is:

I can login to a root shell on my machine (yes or no, or I don't know): yes

The version of my client is (e.g. output of certbot --version or certbot-auto --version if you're using Certbot): certbot 0.31.0

here is my bitnami config: `- There are 2 wordpress configurations that point to two differrent folders
Blog.hoozing.com
○ Blog.hoozing.vn

HTTP server

#server {

listen 80;

server_name localhost;

#include "/opt/bitnami/nginx/conf/bitnami/phpfastcgi.conf";

include "/opt/bitnami/nginx/conf/bitnami/bitnami-apps-prefix.conf";

#}

HTTPS server

#server {

listen 443 ssl;

server_name localhost;

ssl_certificate server.crt;

ssl_certificate_key server.key;

ssl_session_cache shared:SSL:1m;

ssl_session_timeout 5m;

ssl_ciphers HIGH:!aNULL:!MD5;

ssl_prefer_server_ciphers on;

#include "/opt/bitnami/nginx/conf/bitnami/phpfastcgi.conf";

include "/opt/bitnami/nginx/conf/bitnami/bitnami-apps-prefix.conf";

#}

blog.hoozing.com ----------

server {
listen 80;
server_name blog.hoozing.com;
#include "/opt/bitnami/nginx/conf/bitnami/phpfastcgi.conf";
include "/opt/bitnami/apps/phpmyadmin/conf/nginx-prefix.conf";
include "/opt/bitnami/apps/blog.hoozing.com/conf/nginx-prefix.conf";
}
server {
listen 443 ssl;
server_name blog.hoozing.com;
ssl_certificate STAR_hoozing_com.crt;
ssl_certificate_key STAR_hoozing_com.key;
ssl_session_cache shared:SSL:1m;
ssl_session_timeout 5m;
ssl_ciphers HIGH:!aNULL:!MD5;
ssl_prefer_server_ciphers on;
include "/opt/bitnami/apps/phpmyadmin/conf/nginx-prefix.conf";
include "/opt/bitnami/apps/blog.hoozing.com/conf/nginx-prefix.conf";
}

blog.hoozing.vn ----------

server {
listen 80;
server_name blog.hoozing.vn;
include "/opt/bitnami/apps/phpmyadmin/conf/nginx-prefix.conf";
include "/opt/bitnami/apps/blog.hoozing.vn/conf/nginx-prefix.conf";
}
server {
listen 443 ssl;
server_name blog.hoozing.vn;
ssl_certificate blog_hoozing_vn.crt;
ssl_certificate_key blog_hoozing_vn.key;
ssl_session_cache shared:SSL:1m;
ssl_session_timeout 5m;
ssl_ciphers HIGH:!aNULL:!MD5;
ssl_prefer_server_ciphers on;
include "/opt/bitnami/apps/phpmyadmin/conf/nginx-prefix.conf";
include "/opt/bitnami/apps/blog.hoozing.vn/conf/nginx-prefix.conf";
}
include "/opt/bitnami/nginx/conf/bitnami/bitnami-apps-vhosts.conf";`

If you want to use --tls, you'll need to stop nginx before you run lego.

4 Likes

Thank you, i stop nginx and change the port in conf file to another port to free 443

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.