Question

How To Setup Gittea/Seafile/HTTP Over SSL On The Same Server?

So, this is a bit over my head admin wise. What I’d like to do is setup a single Linux droplet that serves these subdomains using SSL, like so:

I have seen (and performed) the steps to install the services individually, and usually without the SSL component, which I learned how to do using several good quality DigitalOcean How-To’s.

What I can’t seem to grock, however, is how to do these all on one droplet at once with SSL. I know it’s possible … I’m just not grasping how to put it all together, especially the bits about Apache seeming to proxy or forward (or maybe these are not the right words to describe what I am trying to accomplish) or somehow otherwise provide the SSL functionality for the other services.

What should I read to learn how to do this, or maybe it’s been recorded someplace step by step and I just can’t seem to locate the resources? Any help would be greatly appreciated!

Many thanks!


Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

You could use something like Nginx reverse proxy to forward from specific subdomains.

A simple explanation of how this works is, Nginx accepts all the requests that come to the server. It then figures out which domain it is coming from, and will redirect it internally to a different service/software running on a different port.

The configuration can be added such that, any request that comes from the domain, “abc.example.com” should be forwarded to internal port “8080” and any request from “def.example.com” should be forwarded to port “8081”. You can now have your software running on ports 8080 and 8081 respectively.

Now in your DNS settings, point the DNS to the server’s IP address. So that when you go to “abc.example.com” you will see the software running on port 8080, similar case when you go to “def.example.com” you will see the software running on port 8081. Both of them are on the same server.

As for SSL, use let’s encrypt. It’s quite easy to do so and has very good support with Nginx. You just need to install and initialize it.

If you want to learn more, you can search these terms:

  • Reverse Proxy
  • Reverse Proxy with Nginx
  • Let’s encrypt