我按照这些说明使用Nginx在Ubuntu上运行一个.Net Core网站:
https://blog.cinlogic.com/2017/05/10/deploying-an-asp-net-core-web-application-to-ubuntu/
我在网站中创建了以下文件 - 可用于我的网站“mysite1”,它使用默认端口5000,但如果我想创建另一个网站“mysite2”,我将如何进行此操作?
sudo nano /etc/nginx/sites-available/mysite1
server {
listen 80;
access_log /var/log/nginx/mysite1.access.log;
error_log /var/log/nginx/mysite1.error.log;
location / {
proxy_pass http://127.0.0.1:5000;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host:$server_port;
proxy_cache_bypass $http_upgrade;
}
}