Need: How-To Step-by-Step for Multiple WordPress sites on Ubuntu 20/22 LEMP
-
Wow, talk about documentation fragmentation.
We've installed Ubuntu 22 a number of times reaching various points towards the goal of hosting multiple WordPress sites in a single Ubuntu v22.04 (as of this writing) using one MariaDB instance with multiple databases set up within.
NGINX is set up and the server blocks are in place.
This last go-around we managed to get three sites up and running without issue. Once the fourth went in all of a sudden the server would only serve one of the sites no matter what URL was being requested.
Certificates are being handled by RapidSSL as a personal preference. We've not had any issues there.
Please and thanks.
-
@PhlipElder Heh ... go figure.
Example for NGINX via their Official Repository:
Option 2: https://nginx.org/en/linux_packages.html#Ubuntu
We will be running with Option 2 shortly.
*EDIT: It worked fine. -
@PhlipElder said in Need: How-To Step-by-Step for Multiple WordPress sites on Ubuntu 20/22 LEMP:
Wow, talk about documentation fragmentation.
We've installed Ubuntu 22 a number of times reaching various points towards the goal of hosting multiple WordPress sites in a single Ubuntu v22.04 (as of this writing) using one MariaDB instance with multiple databases set up within.
NGINX is set up and the server blocks are in place.
This last go-around we managed to get three sites up and running without issue. Once the fourth went in all of a sudden the server would only serve one of the sites no matter what URL was being requested.
Certificates are being handled by RapidSSL as a personal preference. We've not had any issues there.
Please and thanks.
And, crash and burn again. :0(
As soon as I install the second site the server only pushes the last one set up. sigh
-
First step is to use the official ubuntu package. There are several reasons for this but too much to go into right now.
-
@PhlipElder said in Need: How-To Step-by-Step for Multiple WordPress sites on Ubuntu 20/22 LEMP:
@PhlipElder said in Need: How-To Step-by-Step for Multiple WordPress sites on Ubuntu 20/22 LEMP:
Wow, talk about documentation fragmentation.
We've installed Ubuntu 22 a number of times reaching various points towards the goal of hosting multiple WordPress sites in a single Ubuntu v22.04 (as of this writing) using one MariaDB instance with multiple databases set up within.
NGINX is set up and the server blocks are in place.
This last go-around we managed to get three sites up and running without issue. Once the fourth went in all of a sudden the server would only serve one of the sites no matter what URL was being requested.
Certificates are being handled by RapidSSL as a personal preference. We've not had any issues there.
Please and thanks.
And, crash and burn again. :0(
As soon as I install the second site the server only pushes the last one set up. sigh
Axe that.
Dyslexia can be fun and I can have fun with it. But sometimes it really bites as it has in this case.
I had a character in the Server Block name section so www.domain.com>; and could not see it for the life of me.
Something triggered while looking at the Site.Conf file and I saw it finally today.
EDIT: I saw it because I went back to one of the sites I grabbed a Server Block from and went line by line forcing myself to look at every character. /EDIT
Deleted the character from the various .Conf files. So, yeah, copy & paste also bit me here since I was grabbing *.com> and pasting changing the * portion.
Gotta love it! :0)
Feels good though. Onwards and upwards!
-
https://ubuntu.com/tutorials/install-and-configure-nginx
Just for installing nginx with multiple sites.
-
@PhlipElder said in Need: How-To Step-by-Step for Multiple WordPress sites on Ubuntu 20/22 LEMP:
We've installed Ubuntu 22 a number of times reaching various points towards the goal of hosting multiple WordPress sites in a single Ubuntu v22.04 (as of this writing) using one MariaDB instance with multiple databases set up within.
Just a heads up, but there are actually several reasons to avoid this.
Professional hosting companies for example never do it.
It's simply better to run the sites isolated from each other, for example using VMs or containers like LXC. You can still use a common MariaDB server if you like.
It's more secure and it's more flexible and the overhead is insignificant.
But you may of course have your reasons for wanting to do it
-
@Pete-S said in Need: How-To Step-by-Step for Multiple WordPress sites on Ubuntu 20/22 LEMP:
@PhlipElder said in Need: How-To Step-by-Step for Multiple WordPress sites on Ubuntu 20/22 LEMP:
We've installed Ubuntu 22 a number of times reaching various points towards the goal of hosting multiple WordPress sites in a single Ubuntu v22.04 (as of this writing) using one MariaDB instance with multiple databases set up within.
Just a heads up, but there are actually several reasons to avoid this.
Professional hosting companies for example never do it.
It's simply better to run the sites isolated from each other, for example using VMs or containers like LXC. You can still use a common MariaDB server if you like.
It's more secure and it's more flexible and the overhead is insignificant.
But you may of course have your reasons for wanting to do it
Yeah, I looked into installing the latest package and it didn't want to so I left it.
Reason is n00b. It's a learning process that will give us the foundation to build on as knowledge develops.
-
@PhlipElder said in Need: How-To Step-by-Step for Multiple WordPress sites on Ubuntu 20/22 LEMP:
@Pete-S said in Need: How-To Step-by-Step for Multiple WordPress sites on Ubuntu 20/22 LEMP:
@PhlipElder said in Need: How-To Step-by-Step for Multiple WordPress sites on Ubuntu 20/22 LEMP:
We've installed Ubuntu 22 a number of times reaching various points towards the goal of hosting multiple WordPress sites in a single Ubuntu v22.04 (as of this writing) using one MariaDB instance with multiple databases set up within.
Just a heads up, but there are actually several reasons to avoid this.
Professional hosting companies for example never do it.
It's simply better to run the sites isolated from each other, for example using VMs or containers like LXC. You can still use a common MariaDB server if you like.
It's more secure and it's more flexible and the overhead is insignificant.
But you may of course have your reasons for wanting to do it
Yeah, I looked into installing the latest package and it didn't want to so I left it.
Reason is n00b. It's a learning process that will give us the foundation to build on as knowledge develops.
Well, we're all beginners at first.
But yeah, you should for sure look at installing ubuntu's nginx package:
apt install nginx
Don't use the nginx' ubuntu package from nginx' repositories. That's for advanced users that use them for specific reasons. They are not the same.
A package contains not just the software needed, but also installations scripts, default configurations and other things. That's why you want to use the official ubuntu package and not nginx' ubuntu package. It significantly increases the chance that you can upgrade your ubuntu server to a newer version without problems.
When searching for installation help, don't search for nginx, search for ubuntu nginx. Check out the link I gave in an earlier post. If a guide uses nginx repositories then look elsewhere.
Always set up the webserver with the different sites first, then look at installing wordpress, mariadb etc.
But yes, installations guides are often a mess. A lot of time people posts guides what worked for them but it's not always the best way or current way of doing things.
Sometimes guides also assumes you having certain packages already installed, which you might not have.
PS. Here is another guide that should work pretty well:
https://www.digitalocean.com/community/tutorials/how-to-install-nginx-on-ubuntu-22-04 -
@Pete-S said in Need: How-To Step-by-Step for Multiple WordPress sites on Ubuntu 20/22 LEMP:
@PhlipElder said in Need: How-To Step-by-Step for Multiple WordPress sites on Ubuntu 20/22 LEMP:
@Pete-S said in Need: How-To Step-by-Step for Multiple WordPress sites on Ubuntu 20/22 LEMP:
@PhlipElder said in Need: How-To Step-by-Step for Multiple WordPress sites on Ubuntu 20/22 LEMP:
We've installed Ubuntu 22 a number of times reaching various points towards the goal of hosting multiple WordPress sites in a single Ubuntu v22.04 (as of this writing) using one MariaDB instance with multiple databases set up within.
Just a heads up, but there are actually several reasons to avoid this.
Professional hosting companies for example never do it.
It's simply better to run the sites isolated from each other, for example using VMs or containers like LXC. You can still use a common MariaDB server if you like.
It's more secure and it's more flexible and the overhead is insignificant.
But you may of course have your reasons for wanting to do it
Yeah, I looked into installing the latest package and it didn't want to so I left it.
Reason is n00b. It's a learning process that will give us the foundation to build on as knowledge develops.
Well, we're all beginners at first.
But yeah, you should for sure look at installing ubuntu's nginx package:
apt install nginx
Don't use the nginx' ubuntu package from nginx' repositories. That's for advanced users that use them for specific reasons. They are not the same.
A package contains not just the software needed, but also installations scripts, default configurations and other things. That's why you want to use the official ubuntu package and not nginx' ubuntu package. It significantly increases the chance that you can upgrade your ubuntu server to a newer version without problems.
When searching for installation help, don't search for nginx, search for ubuntu nginx. Check out the link I gave in an earlier post. If a guide uses nginx repositories then look elsewhere.
Always set up the webserver with the different sites first, then look at installing wordpress, mariadb etc.
But yes, installations guides are often a mess. A lot of time people posts guides what worked for them but it's not always the best way or current way of doing things.
Sometimes guides also assumes you having certain packages already installed, which you might not have.
PS. Here is another guide that should work pretty well:
https://www.digitalocean.com/community/tutorials/how-to-install-nginx-on-ubuntu-22-04Yeah, this is part of the steps:
-
Why in the world are you doing this all by hand?
https://wordops.net
https://www.cloudpanel.io
https://apiscp.comThis is just a small number of options available... The first two are even free.
Edit: First link is command line only if your stuck on sticking to the command line.
-
@VoIP_n00b said in Need: How-To Step-by-Step for Multiple WordPress sites on Ubuntu 20/22 LEMP:
Why in the world are you doing this all by hand?
https://wordops.net
https://www.cloudpanel.io
https://apiscp.comThis is just a small number of options available... The first two are even free.
Edit: First link is command line only if your stuck on sticking to the command line.
Several reasons. One, I've never been one to get in a car and drive it without considering how it is getting me around. Thus, I can tear down any engine, rebuild it, and put it all back together. That makes troubleshooting all the much easier when things break. It also makes it easier when I want to add a 75lb shot of NOS and 25lbs of direct drive boost.
I like to know how things work. It's always been helpful.
Trust is another. I'm not much on third parties doing things for me especially cloud based ones. My preference is to do it.
Learning to do things in PowerShell has led to being able to charge a standard fee for what was once a long labourious and error prone click process to a few scripts.
By keep track of where things are at, there's less room for error due to distraction.
And now I can say that I know how to do it. Feather in the cap kind of things. :0)
EDIT: That being said, thanks for the pointers. They're pretty neat!
-
@PhlipElder said in Need: How-To Step-by-Step for Multiple WordPress sites on Ubuntu 20/22 LEMP:
@PhlipElder said in Need: How-To Step-by-Step for Multiple WordPress sites on Ubuntu 20/22 LEMP:
Wow, talk about documentation fragmentation.
We've installed Ubuntu 22 a number of times reaching various points towards the goal of hosting multiple WordPress sites in a single Ubuntu v22.04 (as of this writing) using one MariaDB instance with multiple databases set up within.
NGINX is set up and the server blocks are in place.
This last go-around we managed to get three sites up and running without issue. Once the fourth went in all of a sudden the server would only serve one of the sites no matter what URL was being requested.
Certificates are being handled by RapidSSL as a personal preference. We've not had any issues there.
Please and thanks.
And, crash and burn again. :0(
As soon as I install the second site the server only pushes the last one set up. sigh
I bet it is a matter of being in alphabetical order. That causes a lot of "mystery" issues in this kind of setup.
-
@Pete-S said in Need: How-To Step-by-Step for Multiple WordPress sites on Ubuntu 20/22 LEMP:
@PhlipElder said in Need: How-To Step-by-Step for Multiple WordPress sites on Ubuntu 20/22 LEMP:
We've installed Ubuntu 22 a number of times reaching various points towards the goal of hosting multiple WordPress sites in a single Ubuntu v22.04 (as of this writing) using one MariaDB instance with multiple databases set up within.
Just a heads up, but there are actually several reasons to avoid this.
Professional hosting companies for example never do it.
It's simply better to run the sites isolated from each other, for example using VMs or containers like LXC. You can still use a common MariaDB server if you like.
It's more secure and it's more flexible and the overhead is insignificant.
But you may of course have your reasons for wanting to do it
I think a lot of hosters do actually do this. But I'd say containers are the best option. Also lets you mix and match Apache, Nginx and OpenLiteSpeed if you so wish. That said, we don't do this. But it is a great and standard approach.
-
@Pete-S said in Need: How-To Step-by-Step for Multiple WordPress sites on Ubuntu 20/22 LEMP:
First step is to use the official ubuntu package. There are several reasons for this but too much to go into right now.
Agreed, only one that we use. Latest Ubuntu, built in Nginx.
-
@VoIP_n00b said in Need: How-To Step-by-Step for Multiple WordPress sites on Ubuntu 20/22 LEMP:
Why in the world are you doing this all by hand?
https://wordops.net
https://www.cloudpanel.io
https://apiscp.comThis is just a small number of options available... The first two are even free.
Edit: First link is command line only if your stuck on sticking to the command line.
NEver seen anything like that turn out well. You generally get a vastly inferior system that is hard to support over time. Nothing specific about those particularly, but it's so easy (once you know how) to do it by hand, what's the benefit of the extra tools when they add so much extra overhead and risk?
-
@scottalanmiller said in Need: How-To Step-by-Step for Multiple WordPress sites on Ubuntu 20/22 LEMP:
@PhlipElder said in Need: How-To Step-by-Step for Multiple WordPress sites on Ubuntu 20/22 LEMP:
@PhlipElder said in Need: How-To Step-by-Step for Multiple WordPress sites on Ubuntu 20/22 LEMP:
Wow, talk about documentation fragmentation.
We've installed Ubuntu 22 a number of times reaching various points towards the goal of hosting multiple WordPress sites in a single Ubuntu v22.04 (as of this writing) using one MariaDB instance with multiple databases set up within.
NGINX is set up and the server blocks are in place.
This last go-around we managed to get three sites up and running without issue. Once the fourth went in all of a sudden the server would only serve one of the sites no matter what URL was being requested.
Certificates are being handled by RapidSSL as a personal preference. We've not had any issues there.
Please and thanks.
And, crash and burn again. :0(
As soon as I install the second site the server only pushes the last one set up. sigh
I bet it is a matter of being in alphabetical order. That causes a lot of "mystery" issues in this kind of setup.
I fat fingered it. The ">" at the end of the domain for server_name is what did it.
Since all of the setup files were copy and paste, whenever that got introduced it carried onwards.
Because of the wiring in my head when it happened the first time I didn't see it. So, I flattened everything and started fresh. When it happened the second time I took the time to look at the original reference server block because it was seemingly obvious that I'd done something.