Which web server software do you recommend?
Which web server software do you recommend?
Nginx! Simplex essential and easy.
Unless you need to rely a lot on CGIs then apache maybe is better.
Caddy was my first and it’s very easy to use. I use nginx nowadays because I heard it scales better. It’s harder to use but manageable enough.
Depending on the type of website you’re hosting, you can probably just use Cloudflare pages or Netlify.
Caddy! It has TLS built in and provides simple but powerful configuration with sane defaults.
Example Caddyfile for a static file server:
example.com { root * /var/www file_server }I used nginx in the past, but didn’t like it’s verbose config files.
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.
Check out mod_md - this module allows getting certificates from Let’s Encrypt (or any other ACME cert provider) automatically. Just set this anywhere in your config, reload apache and you’re set. No more fiddling around with certbot.
MDCertificateAgreement accepted MDContactEmail [email protected] MDomain my.example.orgAlso other comments make it look like only nginx supports FastCGI (e.g. php-fpm), apache has supported talking to FastCGI since 2005:
<FilesMatch \.php$> SetHandler "proxy:unix:/run/php/php8.2-fpm.sock|fcgi://localhost" </FilesMatch>Yeah I use php-fpm, I didn’t know much about it the first time I installed it, I just needed it for HTTP 2.
For ssl I just install certbot and let it autorun LetsEncrypt, I haven’t had any issues with any of my ssl certs, it’s pretty nice.
The age old LAMP stack is pretty solid, except for me it’s LAPP cuz I don’t wanna use mysql.
Traefik can’t serve html itself though, can it?
It can route requests to a web server, but it can’t serve the files itself iirc.
This Stack Overflow post seems to confirm this: stackoverflow.com/…/is-there-a-way-to-serve-stati…
Apache httpd if php is involved. Otherwise, nginx.
Both are highly reliable and efficient.