Steps to implement multiple domains on one server

How should I implement multiple domains on one server, is there a detailed tutorial, because I just came here, I hope to get help,thanks!

3 Replies

There are several Linode guides as well as 3rd party videos and sites on how to host a website for several different Linux distributions. Find the one for the operating system you chose and 'do it' for each domain you plan to host… in the Apache platform they are called virtual hosts… I don't know what Nginx calls them. (Stick with Apache and save yourself some drama!)

The first thing you have to do is set up a LAMP stack… Linux (obviously), Apache for sure, MySQL (needed for many content management systems (CMS) like WordPress but not needed if you are not using a CMS, and PHP (if you are going to use it.)

If you follow the steps of installing each item and securing them and then creating the virtual hosts and then changing the DNS for the domains and using Certbot to get your SSL certificates it is not that hard… and if this is your first time you will get a great education on how all of this stuff actually works… and it is the first step to being a Linux system administrator (which is what you have to be to run your own server!)

-ANC
https://newmediacreate.com

NGINX's closest equivalent to Apache virtual hosts are called Server Blocks, and although the syntax is slightly different, their function is essentially the same. Here's some of our NGINX Docs that should help with your config:

I'm personally partial to NGINX (almost exclusively since I'm more familiar with it) so YMMV! The NGINX version of the LAMP stack is similarly called LEMP, and we happen to have Marketplace deployments of both:

I'm personally partial to NGINX… we happen to have Marketplace deployments of both

First of all, the Marketplace deployments won't teach you anything and they often configure things such that they have to be fixed… which is more work than following a 'guide' and doing it yourself.

Second, I've here a long, long time and by far more people have more problems with NGINX than the "tried and true" Apache. Yes there are some use-cases for NGINX over Apache but not many for most people, and a small "first time" site with limited traffic, is surely not one of them.

The main difference between NGINX and Apache web servers is that NGINX has event-driven architecture handling multiple requests within a single thread, while Apache is process-driven creating a thread per each request. Thus, allowing NGINX to have generally better performance.

That said, NGINX comes with small community support as compared to Apache. It does not offer you many modules and extensions as compared to Apache.

If you want to get 'into the weeds' over this you can look at a number of Apache vs. NGINX sites… here is a good one https://kinsta.com/blog/nginx-vs-apache/

Bottom line, if this is your first time out of the gate with running your own server, I predict you will have far fewer issues installing Apache than NGINX.

As I said above, I've been here a long time and I know what I'm talking about.

But by all means ask questions, do the research and make your own decision.

Each server will work for you… it comes down to how much 'drama' you want to deal with!! :-)

To me, there is no more frustrating problem than "server not found" which to me is the 'motto' or 'logo' or 'best description' of NGINX!! :-)

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct