Skip to content

Commit 270c577

Browse files
committed
Fix: Update code with correct values
1 parent 884b597 commit 270c577

File tree

2 files changed

+39
-9
lines changed

2 files changed

+39
-9
lines changed

linode/deploy_on_linode.md

Lines changed: 38 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ At the moment, we are logged in as the root user, who has unlimited priviledges
203203
- If you are not sure if your are in your home directory or not, simply run the command `pwd` in the terminal. `pwd` stands for `print working directory`. Another way to find out if you are in your home directory is to look at your terminal. If you can see a tilde character (`~`), then you are in your home directory.
204204
<br>
205205

206-
- __Moving to your other terminal window running your local machine__, run the following command:
206+
- __Moving to my other terminal window running your local machine__, run the following command:
207207
<br>
208208

209209
```python
@@ -284,9 +284,9 @@ At the moment, we are logged in as the root user, who has unlimited priviledges
284284

285285
### Firewall
286286

287-
- Set up a firewall to monitor and control incoming and outgoing network traffic based on predetermined security rules. For your information, a firewall creates a barrier between a trusted network and an untrusted network. An example of an untrusted network can be the internet.
287+
- I need to set up a firewall to monitor and control incoming and outgoing network traffic based on predetermined security rules. For your information, a firewall creates a barrier between a trusted network and an untrusted network. An example of an untrusted network can be the internet.
288288
<br>
289-
- Install `uncomplicated firewall`:
289+
- Install `ufw` also known as "uncomplicated firewall":
290290
<br>
291291

292292
```python
@@ -297,29 +297,59 @@ At the moment, we are logged in as the root user, who has unlimited priviledges
297297
<br>
298298

299299
```python
300+
# 1
300301
gitauharrison@bolderlearner:~$ sudo ufw default allow outgoing
301302

303+
# Output
304+
305+
Default outgoing policy changed to 'allow'
306+
(be sure to update your rules accordingly)
307+
308+
309+
# 2
302310
gitauharrison@bolderlearner:~$ sudo ufw default deny incoming
311+
312+
# Output
313+
314+
Default incoming policy changed to 'deny'
315+
(be sure to update your rules accordingly)
303316
```
304317

305318
- We want to configure these allow rules to allow for SSH, HTTP and any other port that we may want to access from the outside of our server. Begin by running the commands below. I have provided a brief explanation of what each command does.
306319
<br>
307320
```python
308-
gitauharrison@bolderlearner:~$ sudo ufw allow ssh
321+
gitauharrison@bolderlearner:~$ sudo ufw allow ssh
322+
323+
324+
# Output
325+
Rules updated
326+
Rules updated (v6)
309327
```
310328

311329
- This will allow me to SSH into my server, without which our firewall will prevent its use.
312330
<br>
313331

314332
```python
315333
gitauharrison@bolderlearner:~$ sudo ufw allow 5000
334+
335+
336+
# Output
337+
338+
Rules updated
339+
Rules updated (v6)
316340
```
317341

318342
- This will allow me to access port 5000 which will be used by our flask development server. Using this port will enable me to test my application before going live on a production server.
319343
<br>
320344

321345
```python
322346
gitauharrison@bolderlearner:~$ sudo ufw enable
347+
348+
349+
# Output
350+
351+
Command may disrupt existing ssh connections. Proceed with operation (y|n)? # type "y" for "yes"
352+
Firewall is active and enabled on system startup
323353
```
324354

325355
- The command above basically enables all that we have set for our SSH and port 5000. When prompted, type "y" to activate and enable firewall on system startup.
@@ -350,7 +380,7 @@ There are two ways that I can get my flask application onto my linux server. The
350380

351381
I will use the second method to show you how you can transfer your application files to your server. Kindly note that the project on GitHub does not show the `.env` file which contains all the secret keys needed by our project. For this reason, make sure that you create that file in your root directory and add your keys following the `.env-template` file as a guide. However, since the project is on my local machine, I don't have to worry about "missing" files. I can proceed to copy my entire project folder onto my server.
352382

353-
### Copy Project Root Folder to Server
383+
### Copy Project Folder to New Linode Server
354384

355385
I will run the command below on the __terminal window of my local machine__:
356386
<br>
@@ -374,7 +404,7 @@ gitauharrison@bolderlearner$ ls
374404
# Output
375405

376406
somasoma-elearning-app
377-
# I can check this folder's contents by running the command cd and ls
407+
# I can check this folder's contents by running the commands cd and ls
378408
```
379409

380410
### Create and Activate a Virtual Environment
@@ -575,7 +605,7 @@ server {
575605
listen 80;
576606
server_name 139.162.221.92;
577607
location /static {
578-
alias /home/gitauharrison/somasoma-eLearning-app/app/static/css;
608+
alias /home/gitauharrison/somasoma-eLearning-app/app/static;
579609

580610
}
581611
location / {
@@ -827,7 +857,7 @@ somasoma_elearning_app RUNNING pid 60456, uptime 0:00:13
827857
supervisor> # Type "reload"
828858
Really restart the remote supervisord process y/N? # Answer "y" for "yes"
829859
# You should see "Restarted supervisord"
830-
# Exit serpvisor prompt using "ctrl + c"
860+
# Exit supervisor prompt using "ctrl + c"
831861
```
832862

833863
If I exit my server (by pressing `ctrl + Z` or type "exit") on my terminal, I should still be able to access my application on http://139.162.221.92/. Sometimes it can take a while for the supervisor to start up that process.

linode/secure_domain_with_ssl.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,6 +277,6 @@ Scroll to the bottom of the file and add the following line:
277277

278278
`/tmp/crontab.SYULN5/crontab`: Auto-renewal
279279
```python
280-
30 4 1 * * sudo certbot renw --quiet
280+
30 4 1 * * sudo certbot renew --quiet
281281
```
282282
To save, I will press `ctrl + X`, type `y` and hit `enter`. This basically autorenews the certificate at 4.30 am on the 1st of every month. The `--quiet` option tells the program to not print out any messages or feedback.

0 commit comments

Comments
 (0)