Serving 2 applications with one ssl cert?


#1

I’m setting up a personal ubuntu server for data science, and I want to serve both RStudio server and Jupyter from the site. Yesterday I managed to get an ssl cert signed for my site, https://gnuorleans.org

So, to serve two apps, can I do it with the same cert? I understand that subdomains need their own cert, but I can redirect subdomains through my ddns provider (Google Domains).

So here’s my idea:

  1. At Google Domains, redirect ‘rstudio.gnuorleans.org’ to ‘gnuorleans.org/rstudio
  2. Similarly, redirect ‘jupyter.gnuorleans.org’ to ‘gnuorleans.org/jupyter
  3. Within nginix, use location sections to redirect ‘gnuorleans.org/rstudio’ to ‘127.0.0.1:8787’, and similarly redirect ‘gnuorleans.org/jupyter’ to ‘127.0.0.1:8000’.

Can I do the above with my single signed cert, or do I need to dig into wildcard certs or something like that? If this will work, I suspect it would be fairly simple apart from my very rudimentary knowledge of nginx.

Thanks for any help - David


#2

Hi,

I’m not sure what do you mean by redirect…

If you want to know wheather you could use one certificate file for mutiple domains… the answer is yes, you could include up to 100 domains/hostnames per certificate.

In order for all domains be covered with https & without any error (like “This site is not secure” etc…), you would need to present a certificate that includes your hostname when visitors view your site.

Also, there seems to be a misunderstanding for the DNS part… Google Domains could redirect the site for you, but it’s only going to work on HTTP, for https you’ll see an error message (Message could vary).

You could definitely do that… You just need a certificate that contains all hostnames above & see the below part

Here’s a easier way:
if you use rstudio.gnuorleans.org as the hostname, instead of adding a redirect on Google Domains, add your server’s IP to the hostname in google domain’s DNS panel. (Yes, one IP could have more than one website, even on https). Then make a virtual host for that hostname, instruct Nginx to proxy on that hostname than http://gnuorleans.org/rstudio (If that’s what you want)

You could include all domains/hostnames within one certificate, but you’ll need to have a certificate that includes all hostnames…

Now it’s the important part:
How do you obtain this certificate? (using what software?)

Thank you


#3

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