hamza82 commited on
Commit
7b738c2
·
1 Parent(s): a1070e6

make this code runable and solve error

Browse files
Files changed (1) hide show
  1. nginx.conf +31 -4
nginx.conf CHANGED
@@ -1,4 +1,3 @@
1
- user nginx;
2
  worker_processes auto;
3
 
4
  events {
@@ -6,13 +5,41 @@ events {
6
  }
7
 
8
  http {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9
  server {
10
- listen 8080;
 
11
 
12
  location / {
13
- root /usr/share/nginx/html;
14
- index index.html index.htm;
15
  try_files $uri $uri/ /index.html;
16
  }
 
 
 
 
 
 
17
  }
18
  }
 
 
1
  worker_processes auto;
2
 
3
  events {
 
5
  }
6
 
7
  http {
8
+ include /etc/nginx/mime.types;
9
+ default_type application/octet-stream;
10
+
11
+ # Logging settings
12
+ log_format main '$remote_addr - $remote_user [$time_local] "$request" '
13
+ '$status $body_bytes_sent "$http_referer" '
14
+ '"$http_user_agent" "$http_x_forwarded_for"';
15
+ access_log /var/log/nginx/access.log main;
16
+ error_log /var/log/nginx/error.log warn;
17
+
18
+ # Sendfile settings
19
+ sendfile on;
20
+ tcp_nopush on;
21
+ tcp_nodelay on;
22
+ keepalive_timeout 65;
23
+ types_hash_max_size 2048;
24
+
25
+ # Gzip Settings
26
+ gzip on;
27
+ gzip_disable "msie6";
28
+
29
  server {
30
+ listen 8080;
31
+ server_name localhost;
32
 
33
  location / {
34
+ root /usr/share/nginx/html;
35
+ index index.html index.htm;
36
  try_files $uri $uri/ /index.html;
37
  }
38
+
39
+ # Error pages
40
+ error_page 500 502 503 504 /50x.html;
41
+ location = /50x.html {
42
+ root /usr/share/nginx/html;
43
+ }
44
  }
45
  }