{"id":952,"date":"2017-06-07T05:48:58","date_gmt":"2017-06-07T02:48:58","guid":{"rendered":"https:\/\/community.virtono.com\/?p=952"},"modified":"2017-06-11T08:49:30","modified_gmt":"2017-06-11T05:49:30","slug":"hosting-website-with-caddy-on-ubuntu","status":"publish","type":"post","link":"https:\/\/www.virtono.com\/community\/news-announcements\/hosting-website-with-caddy-on-ubuntu\/","title":{"rendered":"Hosting Website with Caddy on Ubuntu"},"content":{"rendered":"<p><b>Introduction<\/b><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"font-weight: 400\">Caddy is the new trend. Caddy is the new web server. It\u2019s uncomplicated and it\u2019s great to be used for \u00a0environment production.<\/span><\/p>\n<p><span style=\"font-weight: 400\">It contains an helpful automatic TLS encryption. \u00a0It also features an instinctive configuration file, HTTP\/2 support. The HTTP\/2 of Caddy is the new version of HTTP protocol; which helps to make \u00a0website faster by just using single connection for transferring multiple files and header compression among other features . TLS is widely adopted on internet because it provide an great service to serve websites encrypted over a secure connection. It is inconvenience to get and install certificates manually.<\/span><\/p>\n<p><span style=\"font-weight: 400\">Caddy can be called as the great blender with Let\u2019s Encrypt, it provides a certificate authority which then provides free TLS\/SSL certificate and when in need it automatically obtain and renews the certificate. It can also be said as, that whichever \u00a0\u00a0website that is under Caddy it would be automatically served over a secure connection with no additional configuration or action necessary.<\/span><\/p>\n<p><span style=\"font-weight: 400\">For this tutorial, firstly we need to install and configure Caddy. After following all the steps, you will end up with a simple working served using HTTP\/2 and a secure TLS connection.<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"font-weight: 400\">Prerequisites<\/span><\/p>\n<p><span style=\"font-weight: 400\">To follow this tutorial you will need the followings<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">One Ubuntu 16.04 server set up with\u00a0<\/span><span style=\"font-weight: 400\">this initial server setup tutorial<\/span><span style=\"font-weight: 400\">, including a sudo non-root user and a firewall.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">A domain name configured to point to your server. This is necessary for Caddy to obtain an SSL certificate for the website; without using a proper domain name, the website will not be served securely with TLS encryption.\u00a0<\/span><\/li>\n<\/ul>\n<p><span style=\"font-weight: 400\">Step 1 \u2014 Installing the Caddy Binaries<\/span><\/p>\n<p><span style=\"font-weight: 400\">The Caddy project provides an installation script that will retrieve and install the Caddy server&#8217;s binary files. To execute it, type:<\/span><\/p>\n<p>&nbsp;<\/p>\n<ul>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">curl -s https:\/\/getcaddy.com | bash<\/span><\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<p><span style=\"font-weight: 400\">You can view the script by visiting\u00a0https:\/\/getcaddy.com\u00a0in your browser or downloading the file with\u00a0wget\u00a0or\u00a0curl\u00a0before you execute it.<\/span><\/p>\n<p><span style=\"font-weight: 400\">During the installation, the script will use\u00a0sudo\u00a0to gain administrative privileges in order to put Caddy files in system-wide directories, so it might prompt you for a password.<\/span><\/p>\n<p><span style=\"font-weight: 400\">The command output will look like this:<\/span><\/p>\n<p><span style=\"font-weight: 400\"><br \/>\n<\/span><span style=\"font-weight: 400\">Downloading Caddy for linux\/amd64&#8230;<\/span><\/p>\n<p><span style=\"font-weight: 400\">https:\/\/caddyserver.com\/download\/build?os=linux&amp;arch=amd64&amp;arm=&amp;features=<\/span><\/p>\n<p><span style=\"font-weight: 400\">Extracting&#8230;<\/span><\/p>\n<p><span style=\"font-weight: 400\">Putting caddy in \/usr\/local\/bin (may require password)<\/span><\/p>\n<p><span style=\"font-weight: 400\">[sudo] password for sammy:<\/span><\/p>\n<p><span style=\"font-weight: 400\">Caddy 0.9.5<\/span><\/p>\n<p><span style=\"font-weight: 400\">Successfully installed<\/span><\/p>\n<p><span style=\"font-weight: 400\">After the script finishes, the Caddy binaries are installed on the server and ready to use. You can verify that Caddy binaries have been put in place by using\u00a0which\u00a0to check their location.<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">which caddy<\/span><\/li>\n<li style=\"font-weight: 400\"><\/li>\n<\/ul>\n<p><span style=\"font-weight: 400\">The command output will say that the Caddy binary can be found in\u00a0\/usr\/local\/bin\/caddy.<\/span><\/p>\n<p><span style=\"font-weight: 400\">Caddy does not create any system-wide configuration during installation and does not install itself as a service, which means it won&#8217;t start up automatically during boot. In the next two steps, we&#8217;ll create the files Caddy needs to function and install its service file.<\/span><\/p>\n<p><span style=\"font-weight: 400\">Step 2 \u2014 Setting Up Necessary Directories<\/span><\/p>\n<p><span style=\"font-weight: 400\">Caddy&#8217;s automatic TLS support and unit file (which we&#8217;ll install in the next step) expect particular directories and files to exist with specific permissions. We&#8217;ll create them all in this step.<\/span><\/p>\n<p><span style=\"font-weight: 400\">First, create a directory that will house the main\u00a0Caddyfile, which is a configuration file that tells Caddy what websites should it serve and how.<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">sudo mkdir \/etc\/caddy<\/span><\/li>\n<li style=\"font-weight: 400\"><\/li>\n<\/ul>\n<p><span style=\"font-weight: 400\">Change the owner of this directory to the\u00a0<\/span><b>root<\/b><span style=\"font-weight: 400\">\u00a0user and its group to\u00a0<\/span><b>www-data<\/b><span style=\"font-weight: 400\">\u00a0so Caddy can read it.<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">sudo chown -R root:www-data \/etc\/caddy<\/span><\/li>\n<li style=\"font-weight: 400\"><\/li>\n<\/ul>\n<p><span style=\"font-weight: 400\">In this directory, create an empty\u00a0Caddyfile\u00a0which we&#8217;ll edit later.<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">sudo touch \/etc\/caddy\/Caddyfile<\/span><\/li>\n<li style=\"font-weight: 400\"><\/li>\n<\/ul>\n<p><span style=\"font-weight: 400\">Create another directory in\u00a0\/etc\/ssl. Caddy needs this to store the SSL private keys and certificates that it automatically obtains from Let&#8217;s Encrypt.<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">sudo mkdir \/etc\/ssl\/caddy<\/span><\/li>\n<li style=\"font-weight: 400\"><\/li>\n<\/ul>\n<p><span style=\"font-weight: 400\">Caddy needs to be able to write to this directory when it obtains the certificate, so make the owner the\u00a0<\/span><b>www-data<\/b><span style=\"font-weight: 400\">\u00a0user . You can leave the group as\u00a0<\/span><b>root<\/b><span style=\"font-weight: 400\">, unchanged from the default:<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">sudo chown -R www-data:root \/etc\/ssl\/caddy<\/span><\/li>\n<li style=\"font-weight: 400\"><\/li>\n<\/ul>\n<p><span style=\"font-weight: 400\">Then make sure no one else can read those files by removing all the access rights for others.<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">sudo chmod 0770 \/etc\/ssl\/caddy<\/span><\/li>\n<li style=\"font-weight: 400\"><\/li>\n<\/ul>\n<p><span style=\"font-weight: 400\">The final directory we need to create is the one where the website itself will be published. We will use\u00a0\/var\/www, which is customary and also the default path when using other web servers, like Apache or Nginx.<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">sudo mkdir \/var\/www<\/span><\/li>\n<li style=\"font-weight: 400\"><\/li>\n<\/ul>\n<p><span style=\"font-weight: 400\">This directory should be completely owned by\u00a0<\/span><b>www-data<\/b><span style=\"font-weight: 400\">.<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">sudo chown www-data:www-data \/var\/www<\/span><\/li>\n<li style=\"font-weight: 400\"><\/li>\n<\/ul>\n<p><span style=\"font-weight: 400\">You have now prepared the necessary environment for Caddy to run. In the next step, we will configure Caddy as a system service to ensure it starts with system boot and can be managed with\u00a0systemctl.<\/span><\/p>\n<p><span style=\"font-weight: 400\">Step 3 \u2014 Installing Caddy as a System Service<\/span><\/p>\n<p><span style=\"font-weight: 400\">While Caddy does not install itself as a service, the project provides an official\u00a0<\/span><span style=\"font-weight: 400\">systemd\u00a0unit file<\/span><span style=\"font-weight: 400\">. This file does assume the directory structure we set up in the previous step, so make sure your configuration matches.<\/span><\/p>\n<p><span style=\"font-weight: 400\">Download the file from the official Caddy repository. The additional\u00a0-o\u00a0parameter to the\u00a0curl\u00a0command will save the file in the\u00a0\/etc\/systemd\/system\/\u00a0directory and make it visible to\u00a0systemd.<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">sudo curl -s https:\/\/raw.githubusercontent.com\/mholt\/caddy\/master\/dist\/init\/linux-systemd\/caddy.service -o \/etc\/systemd\/system\/caddy.service<\/span><\/li>\n<li style=\"font-weight: 400\"><\/li>\n<\/ul>\n<p><span style=\"font-weight: 400\">Make\u00a0systemd\u00a0aware of the new service file.<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">sudo systemctl daemon-reload<\/span><\/li>\n<li style=\"font-weight: 400\"><\/li>\n<\/ul>\n<p><span style=\"font-weight: 400\">Then, enable Caddy to run on boot.<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">sudo systemctl enable caddy.service<\/span><\/li>\n<li style=\"font-weight: 400\"><\/li>\n<\/ul>\n<p><span style=\"font-weight: 400\">You can verify that the service has been properly loaded and enabled to start on boot by checking its status.<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">sudo systemctl status caddy.service<\/span><\/li>\n<li style=\"font-weight: 400\"><\/li>\n<\/ul>\n<p><span style=\"font-weight: 400\">The output should look as follows:<\/span><\/p>\n<p><span style=\"font-weight: 400\">Caddy service status output<\/span><\/p>\n<ul>\n<li><span style=\"font-weight: 400\"> caddy.service &#8211; Caddy HTTP\/2 web server<\/span><\/li>\n<\/ul>\n<p><span style=\"font-weight: 400\"> \u00a0\u00a0Loaded: loaded (\/etc\/systemd\/system\/caddy.service; enabled; vendor preset: enabled)<\/span><\/p>\n<p><span style=\"font-weight: 400\"> \u00a0\u00a0Active: inactive (dead)<\/span><\/p>\n<p><span style=\"font-weight: 400\"> \u00a0\u00a0\u00a0\u00a0Docs: https:\/\/caddyserver.com\/docs<\/span><\/p>\n<p><span style=\"font-weight: 400\">Specifically, it says that the service is\u00a0<\/span><b>loaded<\/b><span style=\"font-weight: 400\">\u00a0and\u00a0<\/span><b>enabled<\/b><span style=\"font-weight: 400\">, but it is not yet running. We will not start the server just yet because the configuration is still incomplete.<\/span><\/p>\n<p><span style=\"font-weight: 400\">You have now configured Caddy as a system service which will start automatically on boot without the need to run it manually. Next, we&#8217;ll allow web traffic through the firewall.<\/span><\/p>\n<p><span style=\"font-weight: 400\">Step 4 \u2014 Allowing HTTP and HTTPS Connections<\/span><\/p>\n<p><span style=\"font-weight: 400\">Because Caddy wasn&#8217;t installed using APT (Ubuntu&#8217;s package manager), UFW has no way to know how to manage rules for it. We&#8217;ll add those rules manually here.<\/span><\/p>\n<p><span style=\"font-weight: 400\">Caddy serves websites using HTTP and HTTPS protocols, so we need to allow access to the appropriate ports in order to make Caddy available from the internet.<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">sudo ufw allow http<\/span><\/li>\n<li style=\"font-weight: 400\"><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">sudo ufw allow https<\/span><\/li>\n<li style=\"font-weight: 400\"><\/li>\n<\/ul>\n<p><span style=\"font-weight: 400\">Both commands, when run, will output the following success messages:<\/span><\/p>\n<p><span style=\"font-weight: 400\">UFW output<\/span><\/p>\n<p><span style=\"font-weight: 400\">Rule added<\/span><\/p>\n<p><span style=\"font-weight: 400\">Rule added (v6)<\/span><\/p>\n<p><span style=\"font-weight: 400\">This will allow Caddy to serve websites to the visitors freely. In the next step, we will create a sample web page and update the\u00a0Caddyfile\u00a0to serve it in order to test the Caddy installation.<\/span><\/p>\n<p><span style=\"font-weight: 400\">Step 5 \u2014 Creating a Test Web Page and a Caddyfile<\/span><\/p>\n<p><span style=\"font-weight: 400\">Let&#8217;s start by creating a very simple HTML page which will display a plain\u00a0<\/span><b>Hello World!<\/b><span style=\"font-weight: 400\">\u00a0message. This command will create an\u00a0index.html\u00a0file in the website directory we created earlier with just the one line of text,\u00a0&lt;h1&gt;Hello World!&lt;\/h1&gt;, inside.<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">echo &#8216;&lt;h1&gt;Hello World!&lt;\/h1&gt;&#8217; | sudo tee \/var\/www\/index.html<\/span><\/li>\n<li style=\"font-weight: 400\"><\/li>\n<\/ul>\n<p><span style=\"font-weight: 400\">Next, we&#8217;ll fill out the\u00a0Caddyfile. The\u00a0Caddyfile, in its simplest form, consists of one or more\u00a0<\/span><i><span style=\"font-weight: 400\">server blocks<\/span><\/i><span style=\"font-weight: 400\">\u00a0which each define the configuration for a single website. A server block starts with an address definition and is followed by curly braces. Inside the curly braces, you can include configuration directives to apply to that website.<\/span><\/p>\n<p><span style=\"font-weight: 400\">An\u00a0<\/span><i><span style=\"font-weight: 400\">address definition<\/span><\/i><span style=\"font-weight: 400\">\u00a0is specified in the form\u00a0protocol:\/\/host:port. Caddy will assume some defaults by itself if you leave some fields blank. For example, if you specify the protocol but not the port, the latter will be automatically derived (i.e. port\u00a080\u00a0is assumed for HTTP, and port\u00a0443\u00a0is assumed for HTTPS). The rules governing the address format are described in-depth in\u00a0<\/span><a href=\"https:\/\/caddyserver.com\/docs\/caddyfile\" target=\"_blank\" rel=\"noopener\"><span style=\"font-weight: 400\">the official Caddyfile documentation<\/span><\/a><span style=\"font-weight: 400\">.<\/span><\/p>\n<p><span style=\"font-weight: 400\">Open the\u00a0Caddyfile\u00a0you created in Step 2 using\u00a0nano\u00a0or your favorite text editor.<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">sudo nano \/etc\/caddy\/Caddyfile<\/span><\/li>\n<li style=\"font-weight: 400\"><\/li>\n<\/ul>\n<p><span style=\"font-weight: 400\">Paste in the following contents:<\/span><\/p>\n<p><span style=\"font-weight: 400\">\/etc\/caddy\/Caddyfile<\/span><\/p>\n<p><span style=\"font-weight: 400\">http:\/\/ {<\/span><\/p>\n<p><span style=\"font-weight: 400\"> \u00a0\u00a0\u00a0root \/var\/www<\/span><\/p>\n<p><span style=\"font-weight: 400\"> \u00a0\u00a0\u00a0gzip<\/span><\/p>\n<p><span style=\"font-weight: 400\">}<\/span><\/p>\n<p><span style=\"font-weight: 400\">Then save the file and exit. Let&#8217;s explain what this specific\u00a0Caddyfile\u00a0does.<\/span><\/p>\n<p><span style=\"font-weight: 400\">Here, we&#8217;re using\u00a0http:\/\/\u00a0for the address definition. This tells Caddy it should bind to port\u00a080\u00a0and serve all requests using plain HTTP protocol (without TLS encryption), regardless of the domain name used to connect to the server. This will allow you to access the websites Caddy is hosting using your server&#8217;s IP address.<\/span><\/p>\n<p><span style=\"font-weight: 400\">Inside the curly braces of our server block, there are two directives:<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">The\u00a0root\u00a0directive tells Caddy where the website files are located. In our example, it&#8217;s\u00a0\/var\/www, where we created the test page.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">The\u00a0gzip\u00a0directive tells Caddy to use Gzip compression to make the website faster. It does not need additional configuration.<\/span><\/li>\n<\/ul>\n<p><span style=\"font-weight: 400\">Once the configuration file is ready, start the Caddy service.<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">sudo systemctl start caddy<\/span><\/li>\n<li style=\"font-weight: 400\"><\/li>\n<\/ul>\n<p><span style=\"font-weight: 400\">We can now test if the website works. For this you use your server&#8217;s public IP address. If you do not know your server&#8217;s IP address, you can get it with\u00a0curl -4 icanhazip.com. Once you have it, visit\u00a0http:\/\/your_server_ip\u00a0in your favorite browser to see the\u00a0<\/span><b>Hello World!<\/b><span style=\"font-weight: 400\">\u00a0website.<\/span><\/p>\n<p><span style=\"font-weight: 400\">This means your Caddy installation is working correctly. In the next step, you will enable a secure connection to your website with Caddy&#8217;s automatic TLS support.<\/span><\/p>\n<p><span style=\"font-weight: 400\">Step 6 \u2014 Configuring Automatic TLS<\/span><\/p>\n<p><span style=\"font-weight: 400\">One of the main features that distinguishes Caddy from other web servers is its ability to automatically request and renew TLS certificates from Let&#8217;s Encrypt, a free certificate authority (CA). In addition, setting Caddy up to automatically serve websites over secure connection only requires a one line change in the\u00a0Caddyfile.<\/span><\/p>\n<p><span style=\"font-weight: 400\">Caddy takes care of enabling secure HTTPS connection for all configured server blocks and obtaining necessary certificates automatically, assuming some requirements are met by the server blocks configuration.<\/span><\/p>\n<p><span style=\"font-weight: 400\">In order for TLS to work, the following requirements must be met:<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Caddy must be able to bind itself to port\u00a0443\u00a0for HTTPS, and the same port must be accessible from the internet.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">The protocol must not be set to HTTP, the port must not be not set to\u00a080, and TLS must not be explicitly turned off or overridden with other settings (e.g. with the\u00a0tls\u00a0directive in the server block).<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">The hostname must be valid domain name; it must not not empty or set to\u00a0localhost\u00a0or an IP address. This is necessary because Let&#8217;s Encrypt can only issue certificates to valid domain names.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Caddy must know the email address that can be used for key recovery with Let&#8217;s Encrypt.<\/span><\/li>\n<\/ul>\n<p><span style=\"font-weight: 400\">If you&#8217;ve been following this tutorial, the first requirement is already met. However, the current server block address is configured simply as\u00a0http:\/\/, defining a plain HTTP scheme with no encryption as well as no domain name. We have also not provided Caddy with an e-mail address which Let&#8217;s Encrypt requires when requesting for a certificate. If the address is not supplied in the configuration, Caddy asks for it during startup. However, because Caddy is installed as a system service, it cannot ask questions during startup and in the result it will not start properly at all.<\/span><\/p>\n<p><span style=\"font-weight: 400\">To fix this, open the\u00a0Caddyfile\u00a0for editing again.<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">sudo nano \/etc\/caddy\/Caddyfile<\/span><\/li>\n<li style=\"font-weight: 400\"><\/li>\n<\/ul>\n<p><span style=\"font-weight: 400\">First, replace the address definition of\u00a0http:\/\/\u00a0with your domain. This removes the insecure connection forced by HTTP and provides a domain name for the TLS certificate. Second, provide Caddy with an email address using the\u00a0tls\u00a0directive inside the server block.<\/span><\/p>\n<p><span style=\"font-weight: 400\">The modified\u00a0Caddyfile\u00a0should look as follows, with your domain and email address substituted in:<\/span><\/p>\n<p><span style=\"font-weight: 400\">\/etc\/caddy\/Caddyfile<\/span><\/p>\n<p><span style=\"font-weight: 400\">example.com {<\/span><\/p>\n<p><span style=\"font-weight: 400\"> \u00a0\u00a0\u00a0root \/var\/www<\/span><\/p>\n<p><span style=\"font-weight: 400\"> \u00a0\u00a0\u00a0gzip<\/span><\/p>\n<p><span style=\"font-weight: 400\"> \u00a0\u00a0\u00a0tls sammy@example.com<\/span><\/p>\n<p><span style=\"font-weight: 400\">}<\/span><\/p>\n<p><span style=\"font-weight: 400\">Save the file and exit the editor. To apply the changes, restart Caddy.<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">sudo systemctl restart caddy<\/span><\/li>\n<li style=\"font-weight: 400\"><\/li>\n<\/ul>\n<p><span style=\"font-weight: 400\">Now you can direct to \u00a0your browser to\u00a0https:\/\/example.com\u00a0to verify if the changes were applied correctly. If so, you should once again see the\u00a0<\/span><b>Hello World!<\/b><span style=\"font-weight: 400\">\u00a0page. This time you can check that the website is served with HTTPS by looking at the URL or for a lock symbol in the URL bar.<\/span><\/p>\n<p><span style=\"font-weight: 400\">CONCLUSION<\/span><\/p>\n<p><span style=\"font-weight: 400\">Now you can configure your Caddy for properly serving your website over a secure TLS connection. Let\u2019s Encrypt will automatically obtain and renew certificates.With the use of the new HTTP\/2 protocol serve your website over a secure connection, with the use of gzip compression you can reduce your time loading.<\/span><\/p>\n<p><span style=\"font-weight: 400\">This following tutorial was an simple and easy example for the beginners to get started with Caddy. To know more about Caddy unique features you get read it on the official Caddy documentation.<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Introduction &nbsp; Caddy is the new trend. Caddy is the new web server. It\u2019s uncomplicated and it\u2019s great to be used for \u00a0environment production. It contains an helpful automatic TLS encryption. \u00a0It also features an instinctive configuration file, HTTP\/2 support. The HTTP\/2 of Caddy is the new version of HTTP<\/p>\n","protected":false},"author":3,"featured_media":973,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[1],"tags":[],"class_list":["post-952","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-news-announcements"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2017\/06\/how-to-install-caddy-on-ubuntu-16-04.jpg?fit=1200%2C600&ssl=1","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p7ISfL-fm","jetpack_likes_enabled":true,"jetpack-related-posts":[{"id":1152,"url":"https:\/\/www.virtono.com\/community\/tutorial-how-to\/set-up-the-ftp-server-under-debian\/","url_meta":{"origin":952,"position":0},"title":"Set up the FTP server under Debian","author":"Shreyash Sharma","date":"October 23, 2017","format":false,"excerpt":"ProFTPD\u00a0is a widely-used, well-configurable FTP server for UNIX-based operating systems.\u00a0This article shows the\u00a0installation and configuration of ProFTPD\u00a0in version 1.3.5b-4 on\u00a0Debian\u00a0Linux.\u00a0In the example shown, a TLS encryption is configured on the FTP server to encrypt the communication between the FTP client (eg FileZilla) and the FTP server ProFTPD.\u00a0Debian Stretch 9 was\u2026","rel":"","context":"In &quot;Tutorials&quot;","block_context":{"text":"Tutorials","link":"https:\/\/www.virtono.com\/community\/category\/tutorial-how-to\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2017\/10\/unnamed.png?fit=300%2C300&ssl=1&resize=350%2C200","width":350,"height":200},"classes":[]},{"id":1246,"url":"https:\/\/www.virtono.com\/community\/tutorial-how-to\/set-up-password-authentication-with-active-directory-under-debian\/","url_meta":{"origin":952,"position":1},"title":"Set up password authentication with Active Directory under Debian","author":"Daniel Draga","date":"November 6, 2017","format":false,"excerpt":"Centralized directory services such as OpenLDAP or Active Directory (AD) simplify\u00a0password management\u00a0for the administrator and the user.\u00a0In terms of Linux servers, the aspect of SSH\u00a0authentication\u00a0via AD\u00a0is especially\u00a0interesting.\u00a0From the point of view of IT security, this solution is also advantageous: Administrators no longer need to choose and manage different passwords for\u2026","rel":"","context":"In &quot;Tutorials&quot;","block_context":{"text":"Tutorials","link":"https:\/\/www.virtono.com\/community\/category\/tutorial-how-to\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2017\/11\/password-wide.jpeg?fit=623%2C425&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2017\/11\/password-wide.jpeg?fit=623%2C425&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2017\/11\/password-wide.jpeg?fit=623%2C425&ssl=1&resize=525%2C300 1.5x"},"classes":[]},{"id":3368,"url":"https:\/\/www.virtono.com\/community\/tutorial-how-to\/how-to-install-kubernetes-cert-manager\/","url_meta":{"origin":952,"position":2},"title":"How to install Kubernetes Cert-Manager","author":"George B.","date":"May 21, 2023","format":false,"excerpt":"Kubernetes Cert-Manager, an open-source project, has emerged as a powerful tool to streamline certificate management within Kubernetes environments. In this article, we will delve into the world of Cert-Manager, exploring its features, benefits, and how it simplifies the management of certificates. In the world of modern application development, the need\u2026","rel":"","context":"In &quot;Tutorials&quot;","block_context":{"text":"Tutorials","link":"https:\/\/www.virtono.com\/community\/category\/tutorial-how-to\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/05\/How-to-install-Kubernetes-Cert-Manager.png?fit=600%2C330&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/05\/How-to-install-Kubernetes-Cert-Manager.png?fit=600%2C330&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/05\/How-to-install-Kubernetes-Cert-Manager.png?fit=600%2C330&ssl=1&resize=525%2C300 1.5x"},"classes":[]},{"id":1009,"url":"https:\/\/www.virtono.com\/community\/tutorial-how-to\/how-to-set-up-an-object-storage-server-using-minio-on-ubuntu-16-04\/","url_meta":{"origin":952,"position":3},"title":"How to Set Up an Object Storage Server Using Minio on Ubuntu 16.04","author":"Daniel Draga","date":"September 21, 2017","format":false,"excerpt":"If you are looking for a brief introduction of Object Storage and Why would need it, check out this article. And for those of you already familiar with the What and Why of\u00a0Object Storage, in this article we shall cover up the How. Since you've read the title you might\u2026","rel":"","context":"In &quot;Tutorials&quot;","block_context":{"text":"Tutorials","link":"https:\/\/www.virtono.com\/community\/category\/tutorial-how-to\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2017\/09\/Minio-Logo.jpg?fit=612%2C518&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2017\/09\/Minio-Logo.jpg?fit=612%2C518&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2017\/09\/Minio-Logo.jpg?fit=612%2C518&ssl=1&resize=525%2C300 1.5x"},"classes":[]},{"id":1876,"url":"https:\/\/www.virtono.com\/community\/knowledgebase\/understanding-pop3-imap-and-smtp-for-beginners-in-depth\/","url_meta":{"origin":952,"position":4},"title":"Understanding POP3, IMAP, and SMTP for Beginners  In-Depth","author":"Shreyash Sharma","date":"September 21, 2020","format":false,"excerpt":"If you\u2019re thinking how email works, understanding the differences between POP3 vs IMAP and the part of SMTP is a wonderful place to begin. This tutorial will clarify all of those parts in layman conditions and how they function, therefore buckle up and continue reading! You should try out creating\u2026","rel":"","context":"In &quot;Knowledgebase&quot;","block_context":{"text":"Knowledgebase","link":"https:\/\/www.virtono.com\/community\/category\/knowledgebase\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2020\/09\/800-email-pop3-smtp-imap.jpg?fit=800%2C360&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2020\/09\/800-email-pop3-smtp-imap.jpg?fit=800%2C360&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2020\/09\/800-email-pop3-smtp-imap.jpg?fit=800%2C360&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2020\/09\/800-email-pop3-smtp-imap.jpg?fit=800%2C360&ssl=1&resize=700%2C400 2x"},"classes":[]},{"id":214,"url":"https:\/\/www.virtono.com\/community\/knowledgebase\/secure-socket-layer-ssl\/","url_meta":{"origin":952,"position":5},"title":"Secure Socket Layer (SSL)","author":"Daniel Draga","date":"July 30, 2016","format":false,"excerpt":"SSL stands for Secure Socket Layer. Secure Socket Layer (SSL) technology allows web browsers and web servers to communicate over a secure connection Originally developed by Netscape, SSL has been universally accepted on the World Wide Web for authenticated and encrypted communication between clients and servers. Responsible for the emergence\u2026","rel":"","context":"In &quot;Knowledgebase&quot;","block_context":{"text":"Knowledgebase","link":"https:\/\/www.virtono.com\/community\/category\/knowledgebase\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/07\/2.jpg?fit=376%2C286&ssl=1&resize=350%2C200","width":350,"height":200},"classes":[]}],"_links":{"self":[{"href":"https:\/\/www.virtono.com\/community\/wp-json\/wp\/v2\/posts\/952","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.virtono.com\/community\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.virtono.com\/community\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.virtono.com\/community\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/www.virtono.com\/community\/wp-json\/wp\/v2\/comments?post=952"}],"version-history":[{"count":1,"href":"https:\/\/www.virtono.com\/community\/wp-json\/wp\/v2\/posts\/952\/revisions"}],"predecessor-version":[{"id":953,"href":"https:\/\/www.virtono.com\/community\/wp-json\/wp\/v2\/posts\/952\/revisions\/953"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.virtono.com\/community\/wp-json\/wp\/v2\/media\/973"}],"wp:attachment":[{"href":"https:\/\/www.virtono.com\/community\/wp-json\/wp\/v2\/media?parent=952"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.virtono.com\/community\/wp-json\/wp\/v2\/categories?post=952"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.virtono.com\/community\/wp-json\/wp\/v2\/tags?post=952"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}