I want to host my website in my raspberry pi, I’ve read that I would need a web server software for this. Which one do you recommend? It won’t be a complex website.
Apache httpd if php is involved. Otherwise, nginx.
Both are highly reliable and efficient.
nginx
Not sure why others are suggesting a Raspberry Pi and nginx would cause problems? I run three public facing websites on a single Raspberry Pi 4 with 2GB RAM. Has been working flawlessly for 2 years. Typical uptime is measured in multiple months.
Running Wordpress, fail2ban and certbot. Booting and running of a USB drive - have considered SSD but no need as I cache to RAM for performance.
I use NGINX because it’s what I’m familiar with. If I was starting again, I would probably use Caddy.
I have recently started using Caddy and I love it! FOSS, automatic HTTPS, super easy to setup and works well as a reverse proxy. As your website will not be complex, the Caddyfile would be just a few lines.
Traefik.
Nginx! Simplex essential and easy.
Unless you need to rely a lot on CGIs then apache maybe is better.
Hosting personal websites on your own hardware is such a pain, and I would imaging doing it on a rpi would be even more of a pain than on x86 architecture. If at all an option I’d recommend hosting on something like github pages or better still on a VPS.
deleted by creator
I always love Flask for this, it’s a super simple python web server that is basically fully batteries included, just write a couple lines of python and throw your html in either /static or /templates, depending on whether it’s dynamic or not, and you’re live. It’s not gonna move mountains but it’s not meant to.
How is the performance compared to nginx or apache?
Much lower and you shouldn’t care. As long as you’re serving less than one request per second, you will not need to care about performance. If you do, sanic and vibora are drop-in flask replacements and they are both much more performant.