Tried to get SSL on new domain, not working

OMG… yes, you’re right. I’m so sorry. it works.

Although, still it doesn’t shows sub directory… don’t know why…:cry:
but anyway it works. Thank you.

OHHHHH… I also redirect 443 to 8081.
I forgot this every time!
it works now. Thank you!! Thank you all of you guys!

Glad you got a certificate … I guess certbot probably installed it on port 443 though, as I’m still seeing the wrong cert on your external port 443, so you’ll need to install the cert on your port 8081 as well.

I just modified vhost file 443 to 8081, but I guess that’s not correct way to do it?
How can I install the cert on 8081? just replace the port number with the command?

sudo certbot --apache --http-01-port 8081 ?

I would have expected that to work (assuming you reloaded apache afterwards). Do you have another vhost on port 8081 that might be conflicting with it?

I don't think certbot has any direct option to install on a different port.

yes, I do have another vhost files on 8081. jiwon.me and blog.jiwon.me, they’re all port 8081.
now blog.fancytank.com is also port 8081. Is this causing any problem???

That shouldn’t be a problem as long as they don’t have any overlapping ServerName / ServerAlias.

Could you share the vhost config file in question?

This is the vhost file on ‘blog.jiwon.me’.

<IfModule mod_ssl.c>
LISTEN 8081

<VirtualHost *:8081>
  ServerName    blog.jiwon.me
  ServerAdmin 	user1@gmail.com
  DocumentRoot  /home/user1/public_html/blog
  ErrorLog      /var/log/apache2/blog-error_log
  CustomLog     /var/log/apache2/blog-access_log combined
  <Directory /home/user1/public_html/blog>
    DirectoryIndex index.html index.php
    Options FollowSymLinks
    AllowOverride All 
    Require all granted
  </Directory>
SSLCertificateFile /etc/letsencrypt/live/blog.jiwon.me/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/blog.jiwon.me/privkey.pem
Include /etc/letsencrypt/options-ssl-apache.conf
</VirtualHost>
</IfModule>

Hmm, maybe I just got confused about what certificate you actually got…

https://blog.fancytank.com works fine now.
https://fancytank.com still uses the wrong cert. But maybe that’s because you just did the blog subdomain so far. If so, sorry for the false alarm :slight_smile:

Ah, that’s because I delete the cert on fancytank.com, and I didn’t get new one yet.

Anyway, thank you again!
You are a lifesaver! I struggled with this so many hours… you solved it. :grinning:
Bless you.:pray:

2 Likes

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