This tutorial is concerning the How to configure and install Caddy web server on AlmaLinux 8. We will strive our greatest so that you simply perceive this information. I hope you want this weblog How to configure and install Caddy web server on AlmaLinux 8. If your reply is sure then please do share after studying this.
Check How to configure and install Caddy web server on AlmaLinux 8
In this tutorial, we’ll present you ways to install Caddy on AlmaLinux 8. For these of you who didn’t know, Caddy is a robust, open supply, enterprise-grade web server with computerized HTTPS written in Go. It is a light-weight, commercially supported web server that may mechanically purchase and renew SSL / TLS certificates with Let’s Encrypt. This information assumes that you’ve got not less than a primary working information of Linux, how to use the Shell, and most significantly, that you’re internet hosting your website on your personal VPS.
The set up is sort of easy and assumes you’re operating underneath the basis account. (*8*), you might want to add ‘sudo’ to the instructions to acquire root privileges. I’ll present you step-by-step how to install Caddy web server on AlmaLinux 8. You can comply with the identical directions for CentOS and Rocky Linux.
Install Caddy Web Server on RockyLinux 8 / AlmaLinux 8 / CentOS 8
The Caddy web server set up is very easy, however first we’ve to replace the working system.
After that, we will install Caddy by enabling a particular repository with these two instructions.
-
- sudo dnf install ‘dnf-command (copr)’
- sudo dnf copr allow @ caddy / caddy
You can now install Caddy by operating
You can verify the put in model with the command:
-
- caddy model
- v2.4.3 h1: Y1FaV2N4WO3rBqxSYA8UZsZTQdN + PwcoOcAiZTM8C0I =
Caddy web server configuration
You usually have a Firewall operating so that you want to allow ports 80 and 443 on it. Now on the system degree, you are able to do it utilizing these instructions:
-
- sudo firewall-cmd –everlasting –add-service = http
- sudo firewall-cmd –everlasting –add-service = https
And to apply the modifications, restart the firewall.
-
- sudo systemctl reload firewalld
After this you want to allow and begin the Caddy service
-
- sudo systemctl allow –now caddy
Then you’ll be able to verify the standing of the service. Now sure, open a web browser that you simply belief and go to http: your-server. So the Caddy web server is up and operating.
Creating a brand new website on the Caddy web server
This step is the equal of VirtualHost on Apache or ServerBlock on Nginx. So, create the listing devoted to your website.
-
- sudo mkdir -p /var/www/osradar.take a look at/html
In my case I referred to as it osradar.take a look at however you’ll be able to name it no matter you need. Also, create a listing devoted to the logs.
-
- sudo mkdir / var / log / caddy
Make the person caddy the proprietor of each folders.
-
- sudo chown caddy: caddy /var/www/osradar.take a look at/html -R
- sudo chown caddy: caddy / var / log / caddy
Now create an index.html file in your new website listing.
-
- sudo nano /var/www/osradar.take a look at/html/index.html
And add some code. Save your modifications and shut the editor. Now in the principle Caddy config file. Save the modifications. Validate the configuration file
-
- Caddy validate –adapter caddyfile –config / and so forth / caddy / Caddyfile
If the on-screen output ends in a warning, you’ll be able to repair it by operating
-
- caddy fmt – overwrite / and so forth / caddy / Caddyfile
To apply the modifications, restart the Caddy service.
-
- sudo systemctl restart caddy
Final phrases: How to configure and install Caddy web server on AlmaLinux 8
I hope you perceive this text How to configure and install Caddy web server on AlmaLinux 8, in case your reply is not any then you’ll be able to ask something by way of contact discussion board part associated to this text. And in case your reply is sure then please share this text with your loved ones and pals.
https://www.bollyinside.com/articles/how-to-configure-and-install-caddy-web-server-on-almalinux-8/