What is the error message referring to?
Editing Configuration Files for Services
a. First, open nginx’s configuration file in a nano. The configuration filename used here is custom_server.conf. Notice below that the command is preceded by the sudo command. After typing nano include a space and the -l switch to turn on line-numbering.
[analyst@secOps ~]$ sudo nano -l /etc/nginx/custom_server.conf
[sudo] password for analyst:
Use the arrow keys to navigate through the file.
GNU nano 2.8.1 File: /etc/nginx/custom_server.conf
#user html;
worker_processes 1;
#error_log logs/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log info;
#pid logs/nginx.pid;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
#log_format main '$remote_addr - $remote_user [$time_local]
"$request$
# '$status $body_bytes_sent "$http_referer" '
# '"$http_user_agent" "$http_x_forwarded_for"';
#access_log logs/access.log main;
sendfile on;
#tcp_nopush on;
#keepalive_timeout 0;
keepalive_timeout 65;
#gzip on;
server {
listen 81;
server_name localhost;
#charset koi8-r;
#access_log logs/host.access.log main;
location / {
root /usr/share/nginx/html;
index index.html index.htm;
}
#error_page 404 /404.html;
^G Get Help ^O Write Out ^W Where Is ^K Cut Text ^J Justify ^C Cur Pos
^X Exit ^R Read File ^\ Replace ^U Uncut Text^T To Spell ^_ Go To Li
b. While the configuration file has many parameters, we will configure only two: the port nginx listens on for incoming connections, and the directory it will serve web pages from, including the index HTML homepage file.
c. Notice that at the bottom of the window, above the nano commands, the line number is highlighted and listed. On line 36, change the port number from 81 to 8080. This will tell nginx to listen to HTTP requests on port TCP 8080.
d. Next, move to line 44 and change the path from /usr/share/nginx/html/ to /home/analyst/ lab.support.files/
e. Press CTRL+X to save the file. Press Y and then ENTER to confirm and use the custom_server.conf as the filename.
f. Type the command below to execute nginx using the modified configuration file:
[analyst@secOps ~]$ sudo nginx -c custom_server.conf -g "pid /var/run/nginx_v.
pid;"
g. Click the web browser icon on the Dock to launch Firefox.
h. On the address bar, type 127.0.0.1:8080 to connect to a web server hosted on the local machine on port 8080. A page related to this lab should appear.
i. After successfully opening the nginx homepage, look at the connection message in the terminal window.
The error message was generated by the successful web page connection and seems to be caused by a missing favicon.ico file in the lab.support.files directory.
You might also like to view...
The ________ function can add the values in several ranges that meet multiple criteria
Fill in the blank(s) with the appropriate word(s).
_____________________ is one of the most important computer resources
a) The size of the computer monitor b) The number of disk drives that a computer has c) The CPU time needed by a running program d) A wireless keyboard e) A wireless mouse