Create/renew certificate with port different to 443 and 310 redirect

Hi.

I have a domain that is working fine with LE on the principal machine and now I have a second machine running a second service. Both servers have Apache and run web services. For this reason I have to access to the second server specifing a port different to 80 or 443 and on the principal server I have virtual hosts and a HTTP-301 redirect with index.php to access to the second server (same subdomain but specifing port) and I can create a LE certificate por principal server but not for the second one.

Then, is it possible to create a LE certificate for this second server? I now that I can use DNS challenge and cert only and putting it manually on the server but doing that I cannot renew automatically .

To clarify my problem:

subdomain1.domain.com:80 -> virtual host 1 server 1
subdomain1.domain.con:443 -> virtual host 1 server 1, LE ok

subdomain2.domain.com:80 -> virtual host 2 server 1
subdomain2.domain.con:443 -> virtual host 2 server 1, LE ok

=== Here is my problem ===
subdomain3.domain.com:80 -> virtual host 3 server 1, HTTP-301 redirected to subdomain3.domain.com:9978 (server 2) by index.php

subdomain3.domain.com:9978 -> virtual host 1 server 2, using port 80. I can access writing on browser subdomain3.domain.com or subdomain3.domain.com:9978

Then, I can redirect another por for HTTPS to server 2, how can I specify that my HTTPS port is not 443 or how can I tell to certbot than the 301 redirect is “legal”?

Thanks a lot.

Hi @Cherry255

Teh, is it not possible to authenticate automatically two differente servers on same IP? I can use DNS and make it manually every three months.

Thanks a lot.

Hi @ucevista

it is possible, that's the standard setup. One ip address, a lot of vHosts with different domain names and different certificates. SNI is required.

But it's not possible to use a port other then port 80 or port 443.

But you can use a setup like

domain1 + 80 -> redirect domain x port 80 or port 443
domain2 + 80 -> redirect domain x port 80 or port 443
domain3 + 80 -> redirect domain x port 80 or port 443

Domain x validates all three domains.

Read

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