Skip to content

Commit 3c881bb

Browse files
authored
# multiple changes for ease of translation (#1368)
* wording changes * removal of idioms and colloquialisms that cause confusion * fix some spelling mistakes missed on the first editing passes
1 parent 717405d commit 3c881bb

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

docs/guides/containers/lxd_web_servers.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ If you have a specific hard drive or partition you’d like to use for the whole
154154
`Would you like to use an existing empty block device (e.g. a disk or partition)? (yes/no) [default=no]:`
155155
```
156156

157-
Metal As A Service (MAAS) is outside the scope of this document. Accept the defaults for this next bit.
157+
Metal As A Service (MAAS) is outside the scope of this document. Accept the defaults for this.
158158

159159
```
160160
Would you like to connect to a MAAS server? (yes/no) [default=no]:
@@ -170,7 +170,7 @@ What should the new bridge be called? [default=lxdbr0]: `
170170
What IPv4 address should be used? (CIDR subnet notation, “auto” or “none”) [default=auto]:
171171
```
172172

173-
If you want to use IPv6 on your LXD containers, you can turn on this next option. That is up to you, but you mostly shouldn’t need to. I think. I tend to leave it on out of laziness.
173+
If you want to use IPv6 on your LXD containers, you can turn on this next option. That is up to you, but you mostly shouldn’t need to.
174174

175175
```
176176
What IPv6 address should be used? (CIDR subnet notation, “auto” or “none”) [default=auto]:
@@ -228,7 +228,7 @@ Before we do anything else with containers, you need to be able to access your p
228228

229229
The other LXD guide will show you how to do this with the *iptables* firewall, if that’s what you want to do. I tend to use the CentOS default firewall: *firewalld*. So that’s what we’re doing, this time.
230230

231-
`firewalld` is configured via the `firewall-cmd` command. **The absolute first thing we want to do,** before we open any ports, is make sure that your containers can be assigned their IP addresses automatically:
231+
`firewalld` is configured via the `firewall-cmd` command. **The absolute first thing we want to do,** before we open any ports, is making sure that your containers can be assigned their IP addresses automatically:
232232

233233
```bash
234234
firewall-cmd --zone=trusted --permanent --change-interface=lxdbr0
@@ -303,13 +303,13 @@ If for some reason you need a fully privileged container (and you mostly shouldn
303303

304304
For this tutorial, you’ll need three containers:
305305

306-
We’ll call them “proxy-server” (for the container that will be directing web traffic to the other two containers), “nginx-server”, and “apache-server”. Yes, I’ll be showing you how to reverse proxy to both *nginx* and *apache*-based servers. Things like *docker* or NodeJS apps we can wait with until I figure that out myself.
306+
We’ll call them “proxy-server” (for the container that will be directing web traffic to the other two containers), “nginx-server”, and “apache-server”. Yes, I’ll be showing you how to reverse proxy to both *nginx* and *apache*-based servers.
307307

308308
We’ll start by figuring out which image we want to base our containers on. For this tutorial, we’re just using Rocky Linux. Using Alpine Linux, for example, can result in much smaller containers (if storage is a concern), but that’s beyond the scope of this particular document.
309309

310310
### Finding the Image You Want
311311

312-
Here’s the short, short method for starting a container with Rocky Linux:
312+
Here’s the quick method for starting a container with Rocky Linux:
313313

314314
```bash
315315
lxc launch images:rockylinux/8/amd64 my-container
@@ -382,7 +382,7 @@ That should give you output that looks a bit like this (though, if you opted to
382382

383383
So the other guide linked at the beginning of this one has a whole tutorial on how to set LXC/LXD up to work with Macvlan. This is especially useful if you’re running a local server, and you want each container to have an IP address visible on the local network.
384384

385-
When you’re running on a VPS, you don’t often have that option. In fact, you might only have one single IP address that you’re allowed to work with. No biggie. The default networking configuration is designed to accommodate this sort of limitation; answering the `lxd init` questions as I specified above *should* take care of everything.
385+
When you’re running on a VPS, you don’t often have that option. In fact, you might only have one single IP address that you’re allowed to work with. The default networking configuration is designed to accommodate this sort of limitation; answering the `lxd init` questions as I specified above *should* take care of everything.
386386

387387
Basically, LXD creates a virtual network device called a bridge (usually named “lxdbr0”), and all containers get connected to that bridge by default. Through it, they can connect to the internet via your host’s default network device (ethernet, wi-fi, or a virtual network device provided by your VPS). Somewhat more importantly, all of the containers can connect to each other.
388388

@@ -406,7 +406,7 @@ lxc stop mycontainer
406406
lxc restart mycontainer
407407
```
408408

409-
Hey, even Linux needs to reboot sometimes. And heck, you can actually start, stop, and restart all containers at once with the following commands.
409+
Even Linux needs to reboot sometimes. You can actually start, stop, and restart all containers at once with the following commands.
410410

411411
```bash
412412
lxc start --all
@@ -446,7 +446,7 @@ Finally, if you've opened a shell into a container, you leave it the same way yo
446446

447447
#### Copying Containers
448448

449-
Now, if you have a container you’d like to replicate with minimal effort, you don’t need to start a brand new one and install all of your base applications again. That’d be silly. Just run:
449+
Now, if you have a container you’d like to replicate with minimal effort, you don’t need to start a brand new one and install all of your base applications again. That requires extra work that is not needed. Just run:
450450

451451
```bash
452452
lxc copy my-container my-other-container
@@ -496,7 +496,7 @@ You won’t be able to delete the container if it’s running, so you can either
496496
lxc delete my-container --force
497497
```
498498

499-
Now, thanks to tab -command-completion, user error, and the fact that “d” sits next to “s” on most keyboards, you can accidentally delete containers. This is known, in the business, as THE BIG OOPS. (Or at least it’ll be known as THE BIG OOPS when I’m done here.)
499+
Now, thanks to tab -command-completion, user error, and the fact that “d” sits next to “s” on most keyboards, you can accidentally delete containers.
500500

501501
To defend against that, you can set any container to be “protected” (making the process of deleting them take an extra step) with this command:
502502

@@ -516,7 +516,7 @@ lxc exec nginx-server dnf update -y
516516
lxc exec apache-server dnf update -y
517517
```
518518

519-
Then, jump into each container, and get cracking.
519+
Then, jump into each container, and start working.
520520

521521
You’ll also need a text editor for every container. By default, Rocky Linux comes with *vi*, but if you want to simplify your life, *nano* will do. You can install it in each container before you open them up.
522522

@@ -601,7 +601,7 @@ Exit the shell for now, and let's start on the Nginx server.
601601

602602
While this technique *does* work (your web apps and websites will get the users' real IPs), Apache's own access logs *will not show the right IPs.* They'll usually show the IP of the container that your reverse proxy is in. This is apparently a problem with how Apache logs things.
603603

604-
I've found loads of solutions on Google, and none of them have actually worked for me. Watch this space for someone much smarter than I am to figure it out. In the meantime, you can check the proxy server's access logs if you need to see the IP addresses yourself, or check the logs of whatever web app you're installing.
604+
You can check the proxy server's access logs if you need to see the IP addresses yourself, or check the logs of whatever web app you're installing.
605605

606606
### The Nginx website server
607607

@@ -782,9 +782,9 @@ Let's break that down a little:
782782

783783
The `proxy_protocol` bit in the `listen` variables is *essential* for the proxy server to work. Never leave it out.
784784

785-
For every LXD/website configuration file, you'll need to change the `upstream`, `server`, `server_name`, and `proxy_pass` settings accordingly. The text after "http://" in `proxy-pass` must match the txt that comes after the `upstream` text.
785+
For every LXD/website configuration file, you'll need to change the `upstream`, `server`, `server_name`, and `proxy_pass` settings accordingly. The text after "http://" in `proxy-pass` must match the text that comes after the `upstream` text.
786786

787-
Reload the server with `systemctl restart nginx`, then point your browser at whatever domain you're using instead of `apache.server.test`. If you see a page that looks like this, you're golden:
787+
Reload the server with `systemctl restart nginx`, then point your browser at whatever domain you're using instead of `apache.server.test`. If your page looks like this, you have success:
788788

789789
![A screenshot of the default Rocky Linux Apache welcome page](../images/lxd-web-server-03.png)
790790

@@ -801,7 +801,7 @@ Just kinda repeat the process. Create a file just like before:
801801
nano /etc/nginx/conf.d/nginx-server.conf
802802
```
803803

804-
Add the approriate text:
804+
Add the appropriate text:
805805

806806
```
807807
upstream nginx-server {
@@ -825,7 +825,7 @@ server {
825825
}
826826
```
827827

828-
Again, reload the proxy server, point your browser at the appropriate address, and hope to whatever deity your prefer that you see this:
828+
Again, reload the proxy server, point your browser at the appropriate address, and hope that you see this:
829829

830830
![A screenshot of the default Rocky Linux Nginx welcome page](../images/lxd-web-server-04.png)
831831

0 commit comments

Comments
 (0)