Host ASP.NET Core on Ubuntu with Nginx
Nginx settings:
/etc/nginx/sites-available/domain.name.com
include /etc/nginx/proxy.conf;
limit_req_zone $binary_remote_addr zone=one:10m rate=5r/s;
server_tokens off;
upstream corshapi {
server localhost:5001;
}
add_header X-Frame-Options DENY;
add_header X-Content-Type-Options nosniff;
limit_req zone=one burst=10 nodelay;
location /api {
proxy_pass http://localhost:5001;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection keep-alive;
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
Reference
- Publishing to local IIS failed to include JS files for Pages when using 'abp-script' Tag
- Configure IdentityServer4 behind nginx reverse-proxy
- Enforce HTTPS in ASP.NET Core
- Host ASP.NET Core on Linux with Nginx
- Depoloyment Problem: invalid_request
- ABP Framework to Azure! - Part 10
- Sign-in - IdentityServer 4
- Authorization in Angular UI
评论已关闭