Mă confrunt cu această eroare,
Pornirea nginx: nginx: [emerg] directiva „locație” nu este permisă aici în /etc/nginx/nginx.conf:49 nginx: testul fișierului de configurare /etc/nginx/nginx.conf a eșuat
Acesta este fișierul meu nginx.conf:
Pentru mai multe informații despre configurare, consultați:
2
3
4
5 utilizatori nginx;
6 worker_proceses auto;
7 error_log /var/log/nginx/error.log;
8 pid /run/nginx.pid;
9
10
11 includ /usr/share/nginx/modules/*.conf;
12
13 evenimente {
14 lucrători_conexiuni 1024;
15}
16
17 http {
18 log_format main '$remote_addr - $remote_user [$time_local] "$request" '
19 '$status $body_bytes_sent "$http_referer" '
20 '"$http_user_agent" "$http_x_forwarded_for"';
21
22 access_log /var/log/nginx/access.log principal;
23
24 sendfile activat;
25 tcp_nopush activat;
26 tcp_nodelay activat;
27 keepalive_timeout 65;
28 types_hash_max_size 4096;
29
30 includ /etc/nginx/mime.types;
31 default_type application/octet-stream;
32
33
34
35
36 includ /etc/nginx/conf.d/*.conf;
37 includ /etc/nginx/sites-enabled/*.conf;
38
39
40
41
42
43
44
45
46 includ /etc/nginx/default.d/*.conf;
47
48 error_page 404 /404.html;
49 locație = /404.html {
50}
51
52 error_page 500 502 503 504 /50x.html;
53 locație = /50x.html {
54}
55}
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84}
85