nginx start
This commit is contained in:
parent
e95792c3ed
commit
038cb33910
5 changed files with 73 additions and 4 deletions
1
nginx/html/index.html
Normal file
1
nginx/html/index.html
Normal file
|
|
@ -0,0 +1 @@
|
|||
hello from nginx!
|
||||
28
nginx/nginx.conf
Normal file
28
nginx/nginx.conf
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue