Lao Zuo saw scripts and simple applications for one click quick installation of caddy web server when he browsed overseas resource websites in the evening, so he prepared to sort them out in his blog. Caddy is a web service server written in GO language, which supports HTTP/2 static web server. Of course, Lao Zuo did not study its functions in depth, because I saw after a simple quick installation that it supports HTML and other static files. For PHP and other dynamic interactive environments, we often use it in Nginx, Apache and other dynamic interactive environments.
When recording this article, Lao Zuo probably browsed the relevant information about Caddy. There is still relatively little information in China. Maybe he will pay attention to it later or may contact it later. First, he recorded the method of quickly installing the Caddy WEB server and the actual application.
First, Caddy WEB server installation
wget script.yesgig.eu.org/caddy.sh -O - -o /dev/null|bash
This script resource comes from the GitHub resource document( here )After the Linux environment is deployed, you can download the caddy.sh file and execute bash caddy.sh to run the installation. Or we can directly execute the above document.
After executing the above installation script, we can see that the relevant caddy commands are executed according to the prompts. Here, I first execute caddy install to install the WEB environment, and then caddy start. In this process, I am required to bind a domain name. I enter a domain name that has been resolved here, and the Let's Encrypt free SSL certificate will be automatically installed.
Second, check whether the caddy is installed
Here Lao Zuo opens the bound domain name and sees the above interface as shown in the figure. By default, SSL certificates are installed for us and the default page is seen. We can modify the HTML page in the corresponding directory, so that a simple static Web site environment is configured.
III. General caddy command usage
Caddy start - Start
Caddy stop - pause
Caddy restart - restart
Caddy status - check status
Caddy install - new installation
Caddy service - Execute command tasks
Caddy update - Update
Caddy delete - Uninstall
Caddy about - View Help
Caddy version - check version
To sum up, Lao Zuo is only the first time to contact the Caddy WEB service environment. When he sees this interesting thing, he will record it first, so that he can learn it later if he encounters in-depth use.
Scan the code to follow the official account
Get more news about webmaster circle!
Entrepreneurship, operation and new knowledge