-
Notifications
You must be signed in to change notification settings - Fork 0
/
default.conf
61 lines (49 loc) · 1.11 KB
/
default.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# web service1 config.
server {
listen 80;
#listen 443 ssl http2;
server_name app1.localhost;
# Path for SSL config/key/certificate
#ssl_certificate /etc/ssl/certs/nginx/example1.crt;
#ssl_certificate_key /etc/ssl/certs/nginx/example1.key;
#include /etc/nginx/includes/ssl.conf;
location / {
include /etc/nginx/includes/proxy.conf;
proxy_pass http://app1;
}
access_log off;
error_log /var/log/nginx/error.log error;
}
# web service2 config.
server {
listen 80;
#listen 443 ssl http2;
server_name app2.localhost;
# Path for SSL config/key/certificate
#ssl_certificate /etc/ssl/certs/nginx/example2.crt;
#ssl_certificate_key /etc/ssl/certs/nginx/example2.key;
#include /etc/nginx/includes/ssl.conf;
location / {
include /etc/nginx/includes/proxy.conf;
proxy_pass http://app2;
}
access_log off;
error_log /var/log/nginx/error.log error;
}
# Default
server {
listen 80 default_server;
server_name _;
root /var/www/html;
charset UTF-8;
error_page 404 /backend-not-found.html;
location = /backend-not-found.html {
allow all;
}
location / {
return 404;
}
access_log off;
log_not_found off;
error_log /var/log/nginx/error.log error;
}