--> https://www.roundthecode.com/dotnet/asp-net-core-web-hosting/how-to-install-an-asp-net-core-in-net-5-app-on-ubuntu-20-04
https://www.how2shout.com/linux/3-ways-to-install-net-6-dotnet-on-ubuntu-20-04-lts-focal-fossa/
``` Bash
wget https://packages.microsoft.com/config/ubuntu/20.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
dpkg -i packages-microsoft-prod.deb
aptitude update 
aptitude install -y apt-transport-https && aspnetcore-runtime-5.0
aptitude install Apache2
a2enmod rewrite && a2enmod proxy && a2enmod proxy_http && a2enmod headers && a2enmod ssl
nano /etc/apache2/sites-enabled/dotNet5.conf
```
```
<VirtualHost *:*>
    RequestHeader set "X-Forwarded-Proto" expr=%{REQUEST_SCHEME}
</VirtualHost>
<VirtualHost cschmidt.eu:80>
    ProxyPreserveHost On
    ProxyPass / http://127.0.0.1:5000/
    ProxyPassReverse / http://127.0.0.1:5000/
    ServerName cschmidt.eu
    ServerAlias cschmidt.eu
    ErrorLog ${APACHE_LOG_DIR}api-error.log
    CustomLog ${APACHE_LOG_DIR}api-access.log common
</VirtualHost>
```
asp-net core web app erstellen und per ftp in /var/www/cschmidt-cms publishen
``` Bash
nano /etc/systemd/system/cschmidt-cms.service
```
```
[Unit]
Description=cschmidt-cms
[Service]
WorkingDirectory=/var/www/cschmidt-cms/
ExecStart=/usr/bin/dotnet /var/www/cschmidt-cms/cschmidt-cms.dll
Restart=always
# Restart service after 10 seconds if the dotnet service crashes:
RestartSec=10
KillSignal=SIGINT
SyslogIdentif
```
... <a href="/Blog/ViewPosting/2/dotnet-unter-linux">(Weiterlesen)</a>
 
                7/1/2022 10:22:21 PM
                by Chris                  2328