зеркало из https://github.com/Azure/ipam.git
45 строки
1.0 KiB
Nginx Configuration File
45 строки
1.0 KiB
Nginx Configuration File
events {}
|
|
|
|
http {
|
|
# include /etc/nginx/conf.d/*.conf;
|
|
|
|
upstream ui {
|
|
server ipam-ui;
|
|
server ipam-ui:8080 backup;
|
|
}
|
|
|
|
upstream engine {
|
|
server ipam-engine;
|
|
server ipam-engine:8080 backup;
|
|
}
|
|
|
|
server {
|
|
listen 8080 default_server;
|
|
listen [::]:8080 default_server;
|
|
|
|
proxy_next_upstream error timeout http_502;
|
|
|
|
# Frontend
|
|
location / {
|
|
add_header X-Frame-Options "DENY";
|
|
proxy_pass http://ui;
|
|
proxy_intercept_errors on;
|
|
proxy_set_header Host $http_host;
|
|
proxy_set_header X-Forwarded-Host $http_host;
|
|
error_page 404 = /index.html;
|
|
}
|
|
|
|
# Backend
|
|
location /api {
|
|
proxy_pass http://engine;
|
|
proxy_set_header Host $http_host;
|
|
proxy_set_header X-Forwarded-Host $http_host;
|
|
}
|
|
|
|
# You may need this to prevent return 404 recursion.
|
|
location = /404.html {
|
|
internal;
|
|
}
|
|
}
|
|
}
|