FlowCore 2.0 built with .NET 6.0/ASP.NET Core 6.0.
FlowCore includes a .NET cross-platform Kestrel web server, which can be used alone or with a reverse proxy server.
The FlowCore application <runroot> folder contains the ASP.NET Core directory structure.
FlowCore is launched on Linux from the <runroot/FlowCore.dll> file.
This article demonstrates the use of Ubuntu 20.04 (LTS).
FlowCore 2.0 fully supports Linux distributions supported by ASP.NET Core 6.0.
Check out the list: ASP.NET Linux distributions supported by Core 6.0.
1.1 Configure Kestrel binding native ports.
Open the </runroot/appsettings.json> you can see that Kestrel binds the local address and port by default <localhost:5000>.
localhost equals 127.0.0.1 and uses Kestrel to bind native addresses and ports, which can be used with reverse proxies (Nginx, Apache).
You can customize the port that Kestrel binds (recommended port range 5000-60000) as long as the port is not occupied.
3.1 Configure the Nginx reverse proxy to forward external HTTP requests to Kestrel.
Edit the nginx configuration file </etc/nginx/sites-available/default> using <vim>.
using vim edit the nginx configuration file
sudo vim /etc/nginx/sites-available/default
In the following configuration, Nginx forwards the matching request to the Kestrel listening address <http://127.0.0.1:5000>.
3.2 Configure Nginx file upload limits.
Nginx supports uploading files up to 1M by default.
Use <vim > to open </etc/nginx/nginx.conf> and add the following code.
Please configure the file upload limit according to your actual needs.
http {
client_max_body_size 200M;
}
server {
client_max_body_size 200M;
}