Starting with Amazon Linux EC2

Hello, first post and complete noob here - sorry in advance for stating the obvious or for not providing enough information - I’m a designer, not a sysadmin!

I’m looking to set up a web server with an Amazon Linux EC2 machine but I’m stuck. Starting with a fresh instance and SSH’d in, I managed to get as far as:

sudo su
curl https://getcaddy.com | bash
bash returned caddy: command not found
I confirmed the location of caddy with whereis
then did setcap cap_net_bind_service=+ep /usr/local/bin/caddy
Now I’m not sure where to go from here especially as the caddy command is not registered.

I’m tempted by Apache simply because it seems I can just use yum install httpd to get going. My end goal is to get Wordpress on my server but I had a recommendation for Caddy and also understand its advantages over existing solutions, including Apache and nginx. It would be great to receive some guidance with getting this set up as I’m bemused by the currently available information.

Thanks in advance.

1 Like

Hey Nixor,

your command setcap cap_net_bind_service=+ep /usr/local/bin/caddy tells you the location of the caddy executable: /usr/local/bin/caddy

you could go there and start caddy up:

cd /usr/local/bin/
./caddy

or try and execute with the complete path

/usr/local/bin/caddy

Just remember that caddy will try to load the Caddyfile from your current directory.

1 Like

Thanks for this.

I’m trying to understand the Caddyfile documentation and now I’m really lost, haha. I’ll have to find more time to really understand this - right now, I’m just looking for a quick solution.

Hey Nik, thanks for trying Caddy! And sorry for the trouble; I don’t really have documentation for sysadmin-related tasks on purpose, since that varies widely based on the system, owner, etc.

To be able to run Caddy from anywhere, make sure /usr/local/bin is in your $PATH:

echo $PATH

If you see /usr/local/bin as one of the elements in the output, then you should be able to run caddy stand-alone and it will serve the current working directory. That should be all it takes to get Caddy installed.

You’re right that yum install httpd will get Apache up and running, but not PHP and MySQL. And same for Caddy, you’ll have to install PHP and MySQL separately if you want to run WordPress. Try this tutorial by @DenBeke for help with that!

You’ll be happy to know that we’re working on a web UI that should simplify some of these tasks for designers (and other less-technical users) and make it pretty intuitive.

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.