DotNet Applikation unter Apache
Hallo,
ich habe die Aufgabe, eine existierende dotNet 3.1 Applikation unter
Debian mit Apache als Proxy zum Laufen zu bringen. Ich bin anhand der
unten aufgelisteten [Links] vorgegangen. Damit läuft die dotNet
Applikation erstmal im Browser auf http://localhost:5000 . Allerdings
wird nur der rohe Inhalt der Webseite dargestellt - Bilder auf die mit
/img/* verwiesen wird sowie CSS (in /css) werden nicht gefunden.
Ich habe in
/etc/systemd/system/kestrel-helloapp.service
entsprechend [4] einen Eintrag
[Service]
WorkingDirectory=/var/www/myapp
ExecStart=/usr/bin/dotnet /var/www/myapp/myapp.dll
angelegt. Wenn ich dieses WorkingDirectory ändere, kommt unter
http://localhost:5000 gar nichts mehr. Die Bilder liegen allerdings
im Verzeichnisbaum unter
/var/www/myapp/wwwroot/img
Irgendwie muß man Apache und/oder kestrel also erklären, daß das
root-Directory dort ist. Aber wie?
Vielen Dank für hilfreiche Hinweise
Andreas.
[Links]
[1] https://docs.microsoft.com/de-de/dotnet/core/install/linux-package-manager-debian10
[2] https://docs.microsoft.com/de-de/aspnet/core/host-and-deploy/linux-apache?view=aspnetcore-3.1
[3] https://blog.todotnet.com/2017/07/publishing-and-running-your-asp-net-core-project-on-linux/
[4] https://docs.microsoft.com/de-de/aspnet/core/host-and-deploy/linux-apache?view=aspnetcore-3.1
--
http://fam-tille.de
Reply to: