Skip to main content

2 posts tagged with "RaspberryPi"

View All Tags

Running ASP.NET Core on a RaspberryPi 2 with Nginx

· One min read
Mark Burton
Software Engineer & Technical Writer

Failed to load ▒▒▒, error: libunwind.so.8: cannot open shared object file: No such file or directory Failed to bind to CoreCLR at /varwwwPublishOutputlibcoreclr.so'

`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`  ```perl  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
```perl
sudo ln -s /optdotnetdotnet /usrbindotnet
``` # Configuring SSL
Rather than building nginx from source to get SSL I used nginx-core.

Setting up a Raspberry Pi NGINX PHP MySQL LEMP Stack

· 2 min read
Mark Burton
Software Engineer & Technical Writer
sudo apt-get install php-fpm

Then check the version ```PERL $ php -v

You should see something like this
```PERL
PHP 7.0.16-1~bpo8+1 (cli) (built: Feb 18 2017 02:34:09) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2017 Zend Technologies with Zend OPcache v7.0.16-1~bpo8+1, Copyright (c) 1999-2017, by Zend Technologies
``` Then use these instructions to [setup PHP with Nginx](https:/www.digitalocean.comcommunitytutorialshow-to-install-linux-nginx-mysql-php-lemp-stack-in-ubuntu-16-04) Make sure to enable PHP in the Nginx config file, and ensure it is pointing to the correct location, for me that was
```PERL location ~ \.php$ \\\{ include snippetsfastcgi-php.conf; # # # With php5-cgi alone: # fastcgi_pass 127.0.0.1:9000; # # With php5-fpm: fastcgi_pass unix:varrunphpphp7.0-fpm.sock; \\}
``` restart Nginx to pick up the new configuration

sudo nginx -s reload

Test it with a simple php page using `<?php phpinfo(); ?>`  In order to serve extensionless html pages, update the try_files in the location block when setting up the sites-available server blocks config  ```PERL
location \\{ try_files $uri $uri.html $uri/ =404; \}
``` Install MySQL by following this tutorial again by [Ste Wright - Install MySQL Server on you Respberry Pi](https:/www.stewright.me201604install-mysql-server-raspberry-pi)
You should now have a working nginx server running PHP scripts, next time I will setup piwik so you can monitor the traffic to your website.