The whiskey walrus writes some texts

My current choice of web server

So, having a /24 and having every IP address being routable on the internet has its advantages. Namely – every IP can have its own set of open ports without conflict. Having said that, instead of running a central reverse proxy for SSL termination, I can run a caddy web server on each virtual machine if I wanted to, and each can generate its own Let’s Encrypt certificate automatically thanks to Caddy. Because all of the machines would have access to port 80, this is super easy. Don’t get me wrong, if I need certain configurations to be painless with some script that setups apache, I will use it, but I will still likely front it with Caddy in the meantime for easy SSL.

Here’s the link to Caddy server

Caddy server’s setup is pretty simple as well, most static website or php based websites can be configured in 6-12 lines.

 
 ## your domain here
 www.domain.tld{   

 ## redirect your domain from www to @
 redir https://domain.tld{uri}  
 } 

                          
 ## your domain here
 domain.tld {     

 ## this defines the web-server root
 root * /your/www/root/path/here

 ## enable static file server
 file_server
 }
 

The above config will allow you to serve a static site and redirect your visitors from www to the base url for your website.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.