Re:Caddy – a modern web server (vs. Nginx)
by VT_Drew on Monday January 09, 2017 @03:41PM
(#13359596)
>I'm a longtime Windows developer who doesn't have much patience with nerdy complexities.
That is funny because I have setup Apache, Nginx, and IIS web servers before and by far the one I found to have the most nerdy complexities is IIS.
Re:Caddy – a modern web server (vs. Nginx)
by tracker1 on Monday January 09, 2017 @04:33PM
(#13360006)
I think it's often easier because most of the nerdy complexities are via a GUI... though the web.config offers a lot more in more recent versions. And adding in Application Request Routing (reverse-proxy) and the like can get complicated quickly, it's not nearly as bad as either nginx or apache tend to be. I do like what nginx can do combined with lua though, it's pretty damned cool.
All in all, I do like Caddy's defaults and out of the box for newer tech. I haven't really tried it much, mostly out of complacency with nginx/iis in Linux/windows. And I will definitely never run Apache on a new box again.
Re:Caddy – a modern web server (vs. Nginx)
by kmeade on Monday January 09, 2017 @05:40PM
(#13360509)
I agree with both posts above me. While I normally prefer a GUI configuration facility, I wouldn't make the argument that IIS is particularly simpler than Apache.
Getting back to Caddy, configuration is so simple, a GUI would be overkill.
Here's an (entire) example of how to configure a reverse proxy in Caddy...
proxy / 127.0.0.1:8080 {
except /favicon.ico /robots.txt /assets /plainpages /staticstuff /test1
proxy_header X-Forwarded-Proto {scheme}
}
The "except" line is a list of files and directories that are statically served by Caddy.All other content comes from a local server on port 8080.
The "proxy_header" line lets the 2nd server know when contents are being sent as secured (HTTPS)
Isn't that nice? I think so.
Re:Caddy – a modern web server (vs. Nginx)
by mwpmaybe on Monday January 09, 2017 @07:19PM
(#13361331)
I think you want header_upstream instead of proxy_header, at least in newer versions of Caddy, and the transparent[0] preset sets Host, X-Forwarded-For, and X-Forwarded-Proto for you!
proxy / 127.0.0.1:8080 {
except /favicon.ico /robots.txt /assets /plainpages /staticstuff /test1
transparent
}
0. https://caddyserver.com/docs/proxy
I'm a longtime Windows developer who doesn't have much patience with nerdy complexities. I started in 1996 with a buggy, gawd-awful Netscape webserver, moved to the late-lamented O'Reilly WebSite (even had a T-Shirt) and reluctantly settled on MS IIS, with occasional Apache encounters. Caddy has been an absolute breath of fresh air.
I currently run 4 sites from a system at my home, using Namecheap dynamic DNS. Caddy serves the basic web pages and static content and also reverse proxies to an internal Python server for dynamic content. Sounds a little complicated, but believe me, configuration is dead-simple thanks to Caddy. Plus I get full HTTPS from Let's Encrypt for the cost of supplying my email address and agreeing to a EULA - no configuration needed at all.
I've never used a webserver that was easier to configure or had such low resource requirements.