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 <runroot/appsettings.json>, you can see that Kestrel binds the local address and port <localhost:5000> by default.
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.
Apache's configuration file is located in the /etc/httpd/conf.d/ directory.
In Apache on Ubuntu, all virtual host configuration files are stored in /etc/apache2/sites-available.
With the exception of the module configuration file in /etc/httpd/conf.modules.d/, any file with a .conf extension is processed alphabetically.
Configure an Apache reverse proxy to forward external HTTP requests to the Kestrel listening address http://127.0.0.1:5000/.
Create a configuration file named flowcore.conf for your app:
Apache configuration file
<VirtualHost *:*>
RequestHeader set "X-Forwarded-Proto" expr=%{REQUEST_SCHEME}
</VirtualHost>
<VirtualHost *:80>
ProxyPreserveHost On
ProxyPass / http://127.0.0.1:5000/
ProxyPassReverse / http://127.0.0.1:5000/
ServerName office.paicore.com
ServerAlias *.paicore.com
ErrorLog ${APACHE_LOG_DIR}flowcore-error.log
CustomLog ${APACHE_LOG_DIR}flowcore-access.log common
</VirtualHost>