forked from drajer-health/eCRNow-UI
-
Notifications
You must be signed in to change notification settings - Fork 0
/
nginx.conf
46 lines (38 loc) · 1.22 KB
/
nginx.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
server {
listen 80;
server_name localhost; # Change to your domain or IP if necessary
auth_basic "${AUTH_BASIC}";
auth_basic_user_file .htpasswd;
root /usr/share/nginx/html;
index index.html;
location / {
try_files $uri $uri/ /index.html;
}
# Additional configuration can be added here, such as setting up proxy_pass for API requests.
error_page 404 /404.html;
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
location /api {
proxy_pass http://ecrnow-api:8080;
proxy_http_version 1.1;
proxy_redirect off;
proxy_set_header "Connection" "";
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Server $host;
proxy_pass_request_headers on;
}
location /actuator {
auth_basic off;
proxy_pass http://ecrnow-api:8080;
proxy_http_version 1.1;
proxy_redirect off;
proxy_set_header "Connection" "";
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Server $host;
proxy_pass_request_headers on;
}
}