File tree Expand file tree Collapse file tree 1 file changed +40
-0
lines changed Expand file tree Collapse file tree 1 file changed +40
-0
lines changed Original file line number Diff line number Diff line change
1
+
2
+ backup the original nginx config file - move it to a new name
3
+
4
+ ` sudo mv /etc/nginx/nginx.conf /etc/nginx/nginx.conf.old `
5
+
6
+ make new nginx config file with the original name:
7
+
8
+ ` sudo vim /etc/nginx/nginx.conf `
9
+
10
+ Add the following lines to the config file
11
+
12
+ > user www-data;
13
+ > worker_processes auto;
14
+ > pid /run/nginx.pid;
15
+ > include /etc/nginx/modules-enabled/*.conf;
16
+ >
17
+ > events {
18
+ > worker_connections 768;
19
+ > }
20
+ >
21
+ > http {
22
+ > access_log /var/log/nginx/access.log;
23
+ > error_log /var/log/nginx/error.log;
24
+ > include /etc/nginx/conf.d/*.conf;
25
+ > include /etc/nginx/sites-enabled/*;
26
+ >
27
+ > server {
28
+ > listen 83;
29
+ > return 200 "this server listens on 83\n";
30
+ > }
31
+ > }
32
+
33
+ save and exit -> ` ESC ` -> ` :x ENTER `
34
+
35
+ ` sudo nginx -s reload ` -> to reload the config
36
+
37
+ ` curl localhost:83 ` to call the server listening on port83
38
+
39
+ > ubuntu@ip-10-1-1-4:/$ curl localhost:83
40
+ > this server listens on 83
You can’t perform that action at this time.
0 commit comments