Skip to content

Commit 4a87512

Browse files
authored
Fix instructions for setting up Nginx (#33132)
1 parent 995d8b0 commit 4a87512

File tree

1 file changed

+16
-18
lines changed

1 file changed

+16
-18
lines changed

aspnetcore/host-and-deploy/linux-nginx.md

Lines changed: 16 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -169,25 +169,23 @@ To configure Nginx as a reverse proxy to forward HTTP requests to an ASP.NET Cor
169169
---
170170

171171
```text
172-
http {
173-
map $http_connection $connection_upgrade {
174-
"~*Upgrade" $http_connection;
175-
default keep-alive;
176-
}
172+
map $http_connection $connection_upgrade {
173+
"~*Upgrade" $http_connection;
174+
default keep-alive;
175+
}
177176
178-
server {
179-
listen 80;
180-
server_name example.com *.example.com;
181-
location / {
182-
proxy_pass http://127.0.0.1:5000/;
183-
proxy_http_version 1.1;
184-
proxy_set_header Upgrade $http_upgrade;
185-
proxy_set_header Connection $connection_upgrade;
186-
proxy_set_header Host $host;
187-
proxy_cache_bypass $http_upgrade;
188-
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
189-
proxy_set_header X-Forwarded-Proto $scheme;
190-
}
177+
server {
178+
listen 80;
179+
server_name example.com *.example.com;
180+
location / {
181+
proxy_pass http://127.0.0.1:5000/;
182+
proxy_http_version 1.1;
183+
proxy_set_header Upgrade $http_upgrade;
184+
proxy_set_header Connection $connection_upgrade;
185+
proxy_set_header Host $host;
186+
proxy_cache_bypass $http_upgrade;
187+
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
188+
proxy_set_header X-Forwarded-Proto $scheme;
191189
}
192190
}
193191
```

0 commit comments

Comments
 (0)