Running ASP.NET Core on a RaspberryPi 2 with Nginx
I followed the instructions from Get Started and docs.microsoft.com, and found that some additional configuration was required.
prerequisites
the prerequisites are required or you will get an error like:
Failed to load ▒▒▒, error: libunwind.so.8: cannot open shared object file: No such file or directory Failed to bind to CoreCLR at /var/www/PublishOutput/libcoreclr.so'
Permissions
chmod 744?
Tell Kestrel to listen
If you are running headless you will need Kestrel to be listening for external requests to confirm the app is running, this can be done using the ASPNETCORE_URLS environment variable
ASPNETCORE_URLS="http://*:5000" dotnet Your.App.dll
Create the service file
add a symlink for dotnet to limit the changes to the service file
sudo ln -s /opt/dotnet/dotnet /usr/bin/dotnet
Configuring SSL
Rather than building nginx from source to get SSL I used nginx-core.