28 lines
616 B
Nginx Configuration File
28 lines
616 B
Nginx Configuration File
events { }
|
|
|
|
http {
|
|
upstream dotnet_app {
|
|
server dotnet-1;
|
|
server dotnet-2;
|
|
}
|
|
|
|
server {
|
|
listen 80;
|
|
|
|
root /usr/share/nginx/html;
|
|
index index.html;
|
|
|
|
location / {
|
|
try_files $uri $uri/ =404;
|
|
}
|
|
|
|
location /dotnet/ {
|
|
proxy_pass http://dotnet_app;
|
|
proxy_http_version 1.1;
|
|
proxy_set_header Host $host;
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
proxy_set_header X-Forwarded-Proto $scheme;
|
|
}
|
|
}
|
|
}
|