<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>caddy Archives - Linux Windows and android Tutorials</title>
	<atom:link href="https://www.osradar.com/tag/caddy/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.osradar.com</link>
	<description>tutorials and news and Seurity</description>
	<lastBuildDate>Thu, 27 Sep 2018 09:53:26 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=5.8.12</generator>
	<item>
		<title>How to install Caddy on CentOS 7?</title>
		<link>https://www.osradar.com/how-to-install-caddy-on-centos-7/</link>
					<comments>https://www.osradar.com/how-to-install-caddy-on-centos-7/#respond</comments>
		
		<dc:creator><![CDATA[angeloma]]></dc:creator>
		<pubDate>Thu, 27 Sep 2018 09:53:26 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[caddy]]></category>
		<category><![CDATA[CentOS]]></category>
		<category><![CDATA[http]]></category>
		<category><![CDATA[web server]]></category>
		<guid isPermaLink="false">https://www.osradar.com/?p=6040</guid>

					<description><![CDATA[<p>The Internet is an essential part of our lives. There are many websites for anything from working to wasting our time; however, there is a fundamental component of websites and they are the HTTP web servers, such Caddy. A web server is in charge of managing web pages and sending them through the network to [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/how-to-install-caddy-on-centos-7/">How to install Caddy on CentOS 7?</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>The Internet is an essential part of our lives. There are many websites for anything from working to wasting our time; however, there is a fundamental component of websites and they are the HTTP web servers, such <strong>Caddy</strong>.</p>
<p>A web server is in charge of managing web pages and sending them through the network to those who require it and have the permissions for those pages. In other words, it is nothing more than a software with processes waiting for a user connected to it to request the content to store, when a request arrives, the web server, generates its own processes to deliver the content through HTTP protocol. We also have even spoken <a href="https://www.osradar.com/how-to-configure-an-apache-virtual-host-on-debian-9/" target="_blank" rel="noopener">on this site</a> of them on other occasions.</p>
<h2>Here is Caddy</h2>
<p>Caddy is the HTTP/2 web server with automatic HTTPS. That&#8217;s the description they give us on their <a href="https://caddyserver.com/" target="_blank" rel="noopener">website</a>. It is a lightweight, commercially supported web server that can acquire and renew SSL/TLS certificates automatically using Let&#8217;s Encrypt.</p>
<p>Among its most outstanding features are:</p>
<ul>
<li>Easy configuration with the Caddyfile.</li>
<li>Automatic HTTPS on by default (via Let&#8217;s Encrypt)</li>
<li>HTTP/2 by default. In other words, this is important to maintain the security of our websites.</li>
<li>Virtual hosting so multiple sites just work.</li>
<li>Experimental QUIC support for cutting-edge transmissions.</li>
<li>TLS session ticket key rotation for more secure connections.</li>
<li>Extensible with plugins because a convenient web server is a helpful one.</li>
<li>Runs anywhere with no external dependencies.</li>
</ul>
<p>As can be seen, it is an interesting and practical web server. It comes to add to the list that already conform the veterans apache and nginx.</p>
<h2>Install Caddy on CentOS 7</h2>
<p>Installing Caddy on Linux is simple and we can &#8220;build&#8221; our program through its <a href="https://caddyserver.com/download" target="_blank" rel="noopener">download</a> section.</p>
<figure id="attachment_6055" aria-describedby="caption-attachment-6055" style="width: 1366px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-6055" src="https://www.osradar.com/wp-content/uploads/2018/09/1-18.png" alt="1.- Caddy download section" width="1366" height="665" srcset="https://www.osradar.com/wp-content/uploads/2018/09/1-18.png 1366w, https://www.osradar.com/wp-content/uploads/2018/09/1-18-300x146.png 300w, https://www.osradar.com/wp-content/uploads/2018/09/1-18-768x374.png 768w, https://www.osradar.com/wp-content/uploads/2018/09/1-18-1024x499.png 1024w, https://www.osradar.com/wp-content/uploads/2018/09/1-18-696x339.png 696w, https://www.osradar.com/wp-content/uploads/2018/09/1-18-1068x520.png 1068w, https://www.osradar.com/wp-content/uploads/2018/09/1-18-863x420.png 863w" sizes="(max-width: 1366px) 100vw, 1366px" /><figcaption id="caption-attachment-6055" class="wp-caption-text">1.- Caddy download section</figcaption></figure>
<p>Another alternative is to use curl to download it to further simplify the process. In this article I will do it this way.</p>
<p>First, create the a folder called &#8220;caddy&#8221;.</p>
<pre class="">:~# mkadi -p caddy</pre>
<figure id="attachment_6056" aria-describedby="caption-attachment-6056" style="width: 1366px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-6056" src="https://www.osradar.com/wp-content/uploads/2018/09/2-17.png" alt="2.- Creating the folder" width="1366" height="768" srcset="https://www.osradar.com/wp-content/uploads/2018/09/2-17.png 1366w, https://www.osradar.com/wp-content/uploads/2018/09/2-17-300x169.png 300w, https://www.osradar.com/wp-content/uploads/2018/09/2-17-768x432.png 768w, https://www.osradar.com/wp-content/uploads/2018/09/2-17-1024x576.png 1024w, https://www.osradar.com/wp-content/uploads/2018/09/2-17-696x391.png 696w, https://www.osradar.com/wp-content/uploads/2018/09/2-17-1068x600.png 1068w, https://www.osradar.com/wp-content/uploads/2018/09/2-17-747x420.png 747w" sizes="(max-width: 1366px) 100vw, 1366px" /><figcaption id="caption-attachment-6056" class="wp-caption-text">2.- Creating the folder</figcaption></figure>
<p>Then, change the current working directory and finally run <code>curl</code> to download it.</p>
<pre class="">:~# cd caddy
:~# curl https://getcaddy.com | bash -s personal</pre>
<figure id="attachment_6057" aria-describedby="caption-attachment-6057" style="width: 1366px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-6057" src="https://www.osradar.com/wp-content/uploads/2018/09/3-17.png" alt="3.- Downloading Caddy using Curl" width="1366" height="768" srcset="https://www.osradar.com/wp-content/uploads/2018/09/3-17.png 1366w, https://www.osradar.com/wp-content/uploads/2018/09/3-17-300x169.png 300w, https://www.osradar.com/wp-content/uploads/2018/09/3-17-768x432.png 768w, https://www.osradar.com/wp-content/uploads/2018/09/3-17-1024x576.png 1024w, https://www.osradar.com/wp-content/uploads/2018/09/3-17-696x391.png 696w, https://www.osradar.com/wp-content/uploads/2018/09/3-17-1068x600.png 1068w, https://www.osradar.com/wp-content/uploads/2018/09/3-17-747x420.png 747w" sizes="(max-width: 1366px) 100vw, 1366px" /><figcaption id="caption-attachment-6057" class="wp-caption-text">3.- Downloading Caddy using Curl</figcaption></figure>
<p>Note: If you don&#8217;t have curl installed, you can do it by running on a terminal <code>yum install curl</code> as root user.</p>
<p>Next you have to create an html file in the caddy directory.</p>
<pre class="">:~# nano index.html</pre>
<p>For example, something like this.</p>
<figure id="attachment_6059" aria-describedby="caption-attachment-6059" style="width: 1366px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-6059" src="https://www.osradar.com/wp-content/uploads/2018/09/4-22.png" alt="4.- Making a sample .html file" width="1366" height="768" srcset="https://www.osradar.com/wp-content/uploads/2018/09/4-22.png 1366w, https://www.osradar.com/wp-content/uploads/2018/09/4-22-300x169.png 300w, https://www.osradar.com/wp-content/uploads/2018/09/4-22-768x432.png 768w, https://www.osradar.com/wp-content/uploads/2018/09/4-22-1024x576.png 1024w, https://www.osradar.com/wp-content/uploads/2018/09/4-22-696x391.png 696w, https://www.osradar.com/wp-content/uploads/2018/09/4-22-1068x600.png 1068w, https://www.osradar.com/wp-content/uploads/2018/09/4-22-747x420.png 747w" sizes="(max-width: 1366px) 100vw, 1366px" /><figcaption id="caption-attachment-6059" class="wp-caption-text">4.- Making a sample .html file</figcaption></figure>
<p>Save and close the file.</p>
<figure id="attachment_6060" aria-describedby="caption-attachment-6060" style="width: 1357px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-6060" src="https://www.osradar.com/wp-content/uploads/2018/09/5-18.png" alt="5.- Showing index file " width="1357" height="336" srcset="https://www.osradar.com/wp-content/uploads/2018/09/5-18.png 1357w, https://www.osradar.com/wp-content/uploads/2018/09/5-18-300x74.png 300w, https://www.osradar.com/wp-content/uploads/2018/09/5-18-768x190.png 768w, https://www.osradar.com/wp-content/uploads/2018/09/5-18-1024x254.png 1024w, https://www.osradar.com/wp-content/uploads/2018/09/5-18-696x172.png 696w, https://www.osradar.com/wp-content/uploads/2018/09/5-18-1068x264.png 1068w" sizes="(max-width: 1357px) 100vw, 1357px" /><figcaption id="caption-attachment-6060" class="wp-caption-text">5.- Showing index file</figcaption></figure>
<p>By default Caddy uses port 2015. If you want to kill the process to stop its execution, type the following.</p>
<pre class="">:~# pkill caddy</pre>
<h2>Conclusion</h2>
<p>Caddy is emerging as a great option to keep in mind, however, it seems that he still has some way to go in the business field.</p>
<p>And what do you think? did you like the program? do you use it? we want to know what you think</p>
<p>Please spread this article through your social networks.</p>
<p>&nbsp;</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/how-to-install-caddy-on-centos-7/">How to install Caddy on CentOS 7?</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.osradar.com/how-to-install-caddy-on-centos-7/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Install and Enjoy Caddy Web Server on Linux</title>
		<link>https://www.osradar.com/install-and-enjoy-caddy-web-server-on-linux/</link>
					<comments>https://www.osradar.com/install-and-enjoy-caddy-web-server-on-linux/#comments</comments>
		
		<dc:creator><![CDATA[osradar_editor]]></dc:creator>
		<pubDate>Sun, 01 Jul 2018 15:28:33 +0000</pubDate>
				<category><![CDATA[Featured]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[caddy]]></category>
		<category><![CDATA[caddy server]]></category>
		<category><![CDATA[https]]></category>
		<category><![CDATA[https server]]></category>
		<guid isPermaLink="false">https://www.osradar.com/?p=4568</guid>

					<description><![CDATA[<p>In the present world, security is the most important thing to keep an eye on. Even the slightest leakage can allow a huge tragedy to take place. In the case of websites, HTTPS is very important as without it, users are more likely to leak their sensitive info in the online. If you’re a webmaster, [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/install-and-enjoy-caddy-web-server-on-linux/">Install and Enjoy Caddy Web Server on Linux</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>In the present world, security is the most important thing to keep an eye on. Even the slightest leakage can allow a huge tragedy to take place. In the case of websites, HTTPS is very important as without it, users are more likely to leak their sensitive info in the online. If you’re a webmaster, you may already be using NGINX or Apache. These are obviously very popular and powerful, but setting up HTTPS with them is a painful task.</p>
<p>Thanks to the world of devs, there’s another alternative solution to the problem – Caddy Web Server. It’s a really nice alternative to all those popular choices. It also comes with HTTPS by default, saving a lot of hassle and problem in the start.</p>
<p>Let’s take a look on installing Caddy in our system.</p>
<h2>Installing Caddy Web Server</h2>
<p>For installing Caddy in our Linux system, we’re going to use cURL. Caddy works the same on all the available platforms including all the normal Linux versions and server editions. It’s because Caddy loves to distribute their software with the help of a specialized bash script instead of adding software repo.</p>
<p>Run the following command:</p>
<pre>curl https://getcaddy.com | bash -s personal</pre>
<p><img loading="lazy" class="size-full wp-image-4571 aligncenter" src="https://www.osradar.com/wp-content/uploads/2018/07/caddy-install.png" alt="" width="1217" height="273" srcset="https://www.osradar.com/wp-content/uploads/2018/07/caddy-install.png 1217w, https://www.osradar.com/wp-content/uploads/2018/07/caddy-install-300x67.png 300w, https://www.osradar.com/wp-content/uploads/2018/07/caddy-install-768x172.png 768w, https://www.osradar.com/wp-content/uploads/2018/07/caddy-install-1024x230.png 1024w, https://www.osradar.com/wp-content/uploads/2018/07/caddy-install-696x156.png 696w, https://www.osradar.com/wp-content/uploads/2018/07/caddy-install-1068x240.png 1068w" sizes="(max-width: 1217px) 100vw, 1217px" /></p>
<p>In this demo, we’ll be running the Caddy “personal” (free) edition. It’s free of course, but for larger organizations and for higher usage, you should get the commercial edition. However, the commercial one is a bit costly. You can <a href="https://caddyserver.com/products/licenses">check out the commercial price plans here</a>.</p>
<p>If you want to install the commercial version of Caddy Web Server, run the following command:</p>
<pre>curl https://getcaddy.com | bash -s commercial</pre>
<p>After the script finishes downloading and installing Caddy, it&#8217;ll be installed in /usr/local/bin/ directory. Now, run the following command for modifying the Caddy binary.</p>
<pre>sudo setcap cap_net_bind_service=+ep /usr/local/bin/caddy</pre>
<h2><img loading="lazy" class="size-full wp-image-4572 aligncenter" src="https://www.osradar.com/wp-content/uploads/2018/07/caddy-binary-modify.png" alt="" width="1204" height="150" srcset="https://www.osradar.com/wp-content/uploads/2018/07/caddy-binary-modify.png 1204w, https://www.osradar.com/wp-content/uploads/2018/07/caddy-binary-modify-300x37.png 300w, https://www.osradar.com/wp-content/uploads/2018/07/caddy-binary-modify-768x96.png 768w, https://www.osradar.com/wp-content/uploads/2018/07/caddy-binary-modify-1024x128.png 1024w, https://www.osradar.com/wp-content/uploads/2018/07/caddy-binary-modify-696x87.png 696w, https://www.osradar.com/wp-content/uploads/2018/07/caddy-binary-modify-1068x133.png 1068w" sizes="(max-width: 1204px) 100vw, 1204px" /></h2>
<h2>Configuring Caddy</h2>
<p>Now, we have to configure the server. Let’s get going.</p>
<p>Enable root access:</p>
<pre>su

OR

sudo -s</pre>
<p>Create the directories where Caddy will operate:</p>
<pre>mkdir /etc/caddy
mkdir /etc/ssl/caddy
mkdir /var/www</pre>
<p>Note that if your server already contains &#8220;<strong>/var/www/&#8221; </strong>directory, you can skip the last command.</p>
<p><img loading="lazy" class="size-full wp-image-4573 aligncenter" src="https://www.osradar.com/wp-content/uploads/2018/07/caddy-make-dir.png" alt="" width="1212" height="212" srcset="https://www.osradar.com/wp-content/uploads/2018/07/caddy-make-dir.png 1212w, https://www.osradar.com/wp-content/uploads/2018/07/caddy-make-dir-300x52.png 300w, https://www.osradar.com/wp-content/uploads/2018/07/caddy-make-dir-768x134.png 768w, https://www.osradar.com/wp-content/uploads/2018/07/caddy-make-dir-1024x179.png 1024w, https://www.osradar.com/wp-content/uploads/2018/07/caddy-make-dir-696x122.png 696w, https://www.osradar.com/wp-content/uploads/2018/07/caddy-make-dir-1068x187.png 1068w" sizes="(max-width: 1212px) 100vw, 1212px" /></p>
<p>Now, create a new “Caddyfile”:</p>
<pre>touch /etc/caddy/Caddyfile</pre>
<p>Update the folder permission of the Caddy sub-folder:</p>
<pre>chmod 0770 /etc/ssl/caddy</pre>
<p>Now, chown the &#8220;/var/www&#8221; directory.</p>
<pre>chown www-data: /var/www</pre>
<p>For working properly with the “systemd”, run the following commands:</p>
<pre>touch /lib/systemd/system/caddy.service
nano /lib/systemd/system/caddy.service</pre>
<p>Paste the following code into the editor, then &#8220;Ctrl + O&#8221; to save the file and &#8220;Ctrl + X&#8221; to close the editor</p>
<pre>[Unit]
Description=Caddy HTTP/2 web server
Documentation=https://caddyserver.com/docs
After=network-online.target
Wants=network-online.target

[Service]
Restart=on-failure
StartLimitInterval=86400
StartLimitBurst=5

User=www-data
Group=www-data
; Letsencrypt-issued certificates will be written to this directory.
Environment=CADDYPATH=/etc/ssl/caddy

ExecStart=/usr/local/bin/caddy -log stdout -agree=true -conf=/etc/caddy/Caddyfile -root=/var/tmp
ExecReload=/bin/kill -USR1 $MAINPID

LimitNOFILE=1048576
LimitNPROC=64

PrivateTmp=true
PrivateDevices=true
ProtectHome=true
ProtectSystem=full
ReadWriteDirectories=/etc/ssl/caddy

; The following additional security directives only work with systemd v229 or later.
; They further retrict privileges that can be gained by caddy. Uncomment if you like.
; Note that you may have to add capabilities required by any plugins in use.
;CapabilityBoundingSet=CAP_NET_BIND_SERVICE
;AmbientCapabilities=CAP_NET_BIND_SERVICE
;NoNewPrivileges=true

[Install]
WantedBy=multi-user.target

</pre>
<p>Restart “caddy.service”:</p>
<pre>systemctl enable caddy.service
systemctl start caddy.service</pre>
<h2>Setting up domains</h2>
<p>Now, it’s just normal configuration like most other servers to perform some configurations. Let’s start with the domain folder.</p>
<p>Edit the “Caddyfile” for activating your new domain. Don&#8217;t forget to change the names with your domain name.</p>
<pre>mkdir -p /var/www/osradar.com/
nano /etc/caddy/Caddyfile

# Paste the following code for activating your domain on Caddy

domain-demo.com {
root /var/www/osradar.com
}</pre>
<p>Restart the “caddy.service”:</p>
<pre>systemctl restart caddy.service</pre>
<p>Enjoy Caddy! Check out <a href="https://www.osradar.com/install-and-configure-mariadb-server-on-centos-6-7-and-fedora-27-28/">installing MariaDB server on CentOS 6/7 and Fedora 27/28</a>.</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/install-and-enjoy-caddy-web-server-on-linux/">Install and Enjoy Caddy Web Server on Linux</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.osradar.com/install-and-enjoy-caddy-web-server-on-linux/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
	</channel>
</rss>
