在Nginx,Ubuntu服务器上部署asp.net Core 3.1?

时间:2020-10-22 09:22:20

标签: asp.net-core ubuntu nginx amazon-ec2

我正在尝试使用Nginx将项目dotnet核心部署到ec2 ubuntu服务器。

当我在地址栏上输入:http://54.254.171.196/时,它不起作用并且总是返回http://54.254.171.196:5001/

server {
    listen 80;
    listen 443 default_server;  
    root /var/www/html;
    server_name _;
    location / {  
    proxy_pass https://localhost:5500;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection 'upgrade';
    proxy_set_header Host $host;
    proxy_cache_bypass $http_upgrade; 
    try_files $uri $uri/ =404;
    }
}

0 个答案:

没有答案