update from sparkleup

This commit is contained in:
Madison Scott-Clary 2022-06-15 16:00:08 -07:00
parent acfc8817f9
commit 9202bd16fb
1 changed files with 7 additions and 3 deletions

View File

@ -20,11 +20,13 @@ Nginx has become a favorite web server for its speed and flexibility in recent y
### Edit the Configuration ### Edit the Configuration
Next you will need to edit the default Nginx configuration file. Next you will need to edit the default Nginx configuration file. The following example uses `nano`.
sudo nano /etc/nginx/sites-enabled/default ```command
sudo nano etc/nginx/sites-enabled/default
```
Here is what the final configuration might look like; the sections are broken down and briefly explained below. You can update or replace the existing config file, although you may want to make a quick copy first. Here is what the final configuration might look like; the sections are broken down and briefly explained below. You can update or replace the existing config file, although you may want to make a backup copy first.
```nginx ```nginx
server {23 server {23
@ -58,6 +60,8 @@ server {
You will need to update the <^>server_name<^> and `proxy_redirect` lines with your own domain name. There is some additional Nginx magic going on as well that tells requests to be read by Nginx and rewritten on the response side to ensure the reverse proxy is working. You will need to update the <^>server_name<^> and `proxy_redirect` lines with your own domain name. There is some additional Nginx magic going on as well that tells requests to be read by Nginx and rewritten on the response side to ensure the reverse proxy is working.
Save and close the file. If you used `nano`, you can do so by pressing `Ctrl + X`, `Y`, and then `Enter`.
The first section tells the Nginx server to listen to any requests that come in on port 80 (default HTTP) and redirect them to HTTPS. The first section tells the Nginx server to listen to any requests that come in on port 80 (default HTTP) and redirect them to HTTPS.
```nginx ```nginx