Ticket #2625: nginx.conf

File nginx.conf, 2.7 KB (added by lkgendev@…, 2 years ago)

nginx configuration to reproduce the DNS resolution problem with domain name test.local

Line 
1# For more information on configuration, see:
2# * Official English Documentation: http://nginx.org/en/docs/
3# * Official Russian Documentation: http://nginx.org/ru/docs/
4
5user nginx;
6worker_processes auto;
7error_log /var/log/nginx/error.log;
8pid /run/nginx.pid;
9
10# Load dynamic modules. See /usr/share/doc/nginx/README.dynamic.
11include /usr/share/nginx/modules/*.conf;
12
13events {
14 worker_connections 1024;
15}
16
17http {
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" "$upstream_addr"';
21
22 access_log /var/log/nginx/access.log main;
23
24 sendfile on;
25 tcp_nopush on;
26 tcp_nodelay on;
27 keepalive_timeout 65;
28 types_hash_max_size 2048;
29
30 include /etc/nginx/mime.types;
31 default_type application/octet-stream;
32
33 # Load modular configuration files from the /etc/nginx/conf.d directory.
34 # See http://nginx.org/en/docs/ngx_core_module.html#include
35 # for more information.
36 include /etc/nginx/conf.d/*.conf;
37
38 server {
39 listen 80 default_server;
40 listen [::]:80 default_server;
41 server_name _;
42 root /usr/share/nginx/html;
43
44 # Load configuration files for the default server block.
45 include /etc/nginx/default.d/*.conf;
46
47 location / {
48 }
49
50 location /test1 {
51 resolver 127.0.0.53 valid=1s;
52 set $testbackend https://test.local;
53 proxy_pass $testbackend;
54 }
55
56 location /test2 {
57 proxy_pass https://test.local;
58 }
59
60 error_page 404 /404.html;
61 location = /40x.html {
62 }
63
64 error_page 500 502 503 504 /50x.html;
65 location = /50x.html {
66 }
67 }
68
69# Settings for a TLS enabled server.
70#
71# server {
72# listen 443 ssl http2 default_server;
73# listen [::]:443 ssl http2 default_server;
74# server_name _;
75# root /usr/share/nginx/html;
76#
77# ssl_certificate "/etc/pki/nginx/server.crt";
78# ssl_certificate_key "/etc/pki/nginx/private/server.key";
79# ssl_session_cache shared:SSL:1m;
80# ssl_session_timeout 10m;
81# ssl_ciphers PROFILE=SYSTEM;
82# ssl_prefer_server_ciphers on;
83#
84# # Load configuration files for the default server block.
85# include /etc/nginx/default.d/*.conf;
86#
87# location / {
88# }
89#
90# error_page 404 /404.html;
91# location = /40x.html {
92# }
93#
94# error_page 500 502 503 504 /50x.html;
95# location = /50x.html {
96# }
97# }
98
99}
100