• Categories
    Category
    {{ postCtrl.tags }}
    • {{ category.tag_type }}

      • {{tag.tag_name}}
      • View more
  • Categories
    Category
    {{ postCtrl.tags }}
    • {{ category.tag_type }}

      • {{tag.tag_name}}
      • View more
  • News
  • Tutorials
  • Forums
  • Tags
  • Users
Tutorial News Comments FAQ Related Articles

How To Install Caddy on CentOS 7

{{postValue.id}}

To Install Caddy on Centos 7

Caddy is an open source HTTP Web server that used for various platforms including Windows, Mac, Linux, FreeBSD, OpenBSD, etc. It is a full featured HTTP/2 web server which can be automatically enables the HTTPS. It allows the designers to create amazing things with high flexibility and low overhead. This article will show you how to install Caddy on CentOS 7.

Features

  • Automatic HTTPS
  • Easy Deployment
  • Multi-core
  • WebSockets
  • Rewrites & Redirects
  • Virtual Hosts

Installation Procedure

Download the caddy package from its offciail website, which is suitable for your distribution.

[root@linuxhelp ~]# wget https://caddyserver.com/download/builds/173003001257928/caddy_linux_amd64_custom.tar.gz

--2017-04-01 02:30:12--  https://caddyserver.com/download/builds/173003001257928/caddy_linux_amd64_custom.tar.gz
Resolving caddyserver.com (caddyserver.com)... 162.243.142.63, 2604:a880:1:20::8c:3001
Connecting to caddyserver.com
.
.
.
Saving to: ‘ caddy_linux_amd64_custom.tar.gz’ 

100%[==========================================================================================================================================> ] 49,97,180    142KB/s   in 54s   

2017-04-01 02:31:07 (90.0 KB/s) - ‘ caddy_linux_amd64_custom.tar.gz’  saved [4997180/4997180]

[root@linuxhelp ~]# ls
anaconda-ks.cfg  caddy_linux_amd64_custom.tar.gz  Desktop  Documents  Downloads  initial-setup-ks.cfg  Music  Pictures  Public  Templates  Videos

Once the package is downloaded, create a new directory for caddy.

[root@linuxhelp ~]# mkdir caddy

Move the package to the newly created directory.

[root@linuxhelp ~]# mv caddy_linux_amd64_custom.tar.gz caddy
[root@linuxhelp ~]# ls
anaconda-ks.cfg  caddy  Desktop  Documents  Downloads  initial-setup-ks.cfg  Music  Pictures  Public  Templates  Videos
[root@linuxhelp ~]# cd caddy/
[root@linuxhelp caddy]# ls
caddy_linux_amd64_custom.tar.gz

Extract the downloaded package with the tar command.

[root@linuxhelp caddy]# tar -xzvf caddy_linux_amd64_custom.tar.gz
README.txt
LICENSES.txt
CHANGES.txt
init/
init/README.md
init/freebsd/
init/freebsd/caddy
init/linux-systemd/
init/linux-systemd/README.md
init/linux-systemd/caddy.service
init/linux-sysvinit/
init/linux-sysvinit/README.md
init/linux-sysvinit/caddy
init/linux-upstart/
init/linux-upstart/README.md
init/linux-upstart/caddy.conf
init/linux-upstart/caddy.conf.centos-6
init/linux-upstart/caddy.conf.ubuntu-12.04
init/mac-launchd/
init/mac-launchd/README.md
init/mac-launchd/com.caddyserver.web.plist
caddy

Create index.html file in caddy’ s directory.

[root@linuxhelp caddy]# ls
caddy  caddy_linux_amd64_custom.tar.gz  CHANGES.txt  init  LICENSES.txt  README.txt
[root@linuxhelp caddy]# vim index.html

Generally, default index page is required to run the web server.

Enter some text into the index file.

< !doctype html> 
< html> 
    < head> 
        < title>  Caddy Webserver < /title> 
    < /head> 
    < body> 
        < p> Caddy Webserver!< /p> 
    < /body> 
< /html> 

Run the script file to start the caddy web server.

[root@linuxhelp caddy]# ./caddy
Activating privacy features... done.
http://:2015

Finally open the web browser and call the link http://0.0.0.0:2015, caddy' s default port number.

Web server

Here you can view the content given in the index file.

Wasn' t that an easy installation procedure?. Caddy is a full featured HTTP/2 web server that can run on Windows, Mac, Linux, FreeBSD, OpenBSD platforms.

Tags:
mason
Author: 

Comments ( 0 )

No comments available

Add a comment
{{postCtrl.cmtErrMsg}}

Frequently asked questions ( 5 )

Q

Does Caddy has WebSocket availability function?

A

Caddy does provide WebSocket connectivity.

Q

Does Caddy have redirects?

A

Yes Caddy do provide Rewrites & Redirects

Q

./caddy script got executed successfully, but the web page is not getting accessed?

A

The custom port access for Caddy should be added and enabled in the firewall.

Q

What is Caddy software?

A

Caddy is an open source HTTP Web server that used for various platforms including Windows, Mac, Linux, FreeBSD, OpenBSD, etc. It is a full-featured HTTP/2 web server which can automatically enable the HTTPS.

Q

Is Caddy Opensource?

A

Caddy is an open source and free software.

Back To Top!
Rank
User
Points

Top Contributers

userNamenaveelansari
135850

Top Contributers

userNameayanbhatti
92510

Top Contributers

userNamehamzaahmed
32150

Top Contributers

1
userNamelinuxhelp
31040

Top Contributers

userNamemuhammadali
24500
Can you help Jayce ?
What are the types of table used in IPtables

What are the various types of table used in IPtables and how to use that for my server security?

Networking
  • Routing
  • trunk
  • Netmask
  • Packet Capture
  • domain
  • HTTP Proxy
Server Setup
  • NFS
  • KVM
  • Memory
  • Sendmail
  • WebDAV
  • LXC
Shell Commands
  • Cloud commander
  • Command line archive tools
  • last command
  • Shell
  • terminal
  • Throttle
Desktop Application
  • Linux app
  • Pithos
  • Retrospect
  • Scribe
  • TortoiseHg
  • 4Images
Monitoring Tool
  • Monit
  • Apache Server Monitoring
  • EtherApe 
  • Arpwatch Tool
  • Auditd
  • Barman
Web Application
  • Nutch
  • Amazon VPC
  • FarmWarDeployer
  • Rukovoditel
  • Mirror site
  • Chef
Contact Us | Terms of Use| Privacy Policy| Disclaimer
© 2025 LinuxHelp.com All rights reserved. Linux™ is the registered trademark of Linus Torvalds. This site is not affiliated with linus torvalds in any way.