That is a good question Image may be NSFW.Can I run the web server code on Apache2 running on a Pi with Raspberry Pi OS (Bookworm) ?
Clik here to view.

I asked claude.AI - if "he" is to be believed, it is possible to host using Apache on a RPi.
To host a .NET 8 application on Apache on a Raspberry Pi 4, you'll need to take a few steps:
Install .NET 8 on your Raspberry Pi 4. The RPi 4 uses ARM64 architecture, which is supported by .NET 8.
Install Apache on your Raspberry Pi.
Set up a reverse proxy using Apache to forward requests to your .NET application.
Here's a brief outline of the process:
Install .NET 8:
Download and install the ARM64 version of .NET 8 for your RPi 4.
Install Apache
Code:
sudo apt-get updatesudo apt-get install apache2
Enable necessary Apache modules:
Code:
sudo a2enmod proxysudo a2enmod proxy_http
Edit a new config file:
Code:
sudo nano /etc/apache2/sites-available/dotnet-app.conf
Code:
<VirtualHost *:80> ServerName yourdomain.com ProxyPreserveHost On ProxyPass / http://localhost:5000/ ProxyPassReverse / http://localhost:5000/</VirtualHost>
Code:
sudo a2ensite dotnet-app.confsudo systemctl restart apache2
Good luck!
// Lazze
Statistics: Posted by Lazzerman — Fri Aug 09, 2024 6:44 pm