ngix/nfw(week 11) Flashcards

1
Q

What is a web server?

A

Software that is run on a hardware server that serves up documents over the internet (generally using HTTP)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Where is the nginx configuration file?

A

/etc/nginx/nginx.conf

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is a server block?

A

It allows you to setup multiple webservers in a single server

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What are the components of a serverblock?

A

listen = which ports to listen on
server_name = domain name or ip address of incoming traffic
root: dir contains content that you want to server
index: specifies name of index or root document
location: specified what should happen when user navigates to that part

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

how do you test whether nginx works?

A

sudo nginx -t

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

how do you check the status of ufw?

A

sudo ufw status verbose

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What are the commands for configuring ufw?

A

sudo ufw allow
sudo ufw deny
sudo ufw limit

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

How do you enable ufw?

A

sudo ufw enable

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

How do you setup a directory index with nginx?

A

“autoindex on;” as a directive under /files location

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Where is useradd located?

A

/etc/default/useradd

How well did you know this?
1
Not at all
2
3
4
5
Perfectly