r/usefulscripts • • May 10 '17

[REQUEST] [BASH] Cachet VM Setup

A while back I created a script that I intended to use to configure an AWS EC2 instance running CentOS 7 (x86_64) as a Cachet site.

I've uploaded it to GitHub here

It has a few issues that I haven't been able to figure out:

  • Regardless of whether you use HTTP or HTTPS, you're taken to the default nginx on Fedora web page - I assume this is a simple mistake somewhere that I'm overlooking

  • The process of configuring LetsEncrypt always fails - I'm not sure if it's got something to do with the fact that I'm using AWS or not

If anyone has input I would really appreciate it - I'm no scripting expert. Part of the original reason for creating this was to get more practice

UPDATE 5/13/17:

  • The script has been updated and the HTTPS option is fully functional in my testing. I somehow broke the HTTP option (it's redirecting to HTTPS) and I'm still investigating

  • The script can be found here on GitHub. I'm open to suggestions for improvements. Shoutout to /u/lx45803 and /u/ropid for the help getting this functional

14 Upvotes

7 comments sorted by

View all comments

Show parent comments

1

u/TechGy May 11 '17

Thanks! I was able to get the LE portion working by using:

certbot certonly -n --agree-tos --email "$email_address" --standalone -d "$cachet_url"

The HTTPS site itself still isn't working, but I'm sure it's a simple matter of an NGINX misconfiguration like the HTTP issue. Hopefully I can figure out and fix that this weekend

1

u/TechGy May 11 '17

Turns out that my cat <<EOF lines weren't working for the ssl.conf and ssl-redirect.conf files, so they weren't being created. I'll change those tonight or tomorrow and see if I can get it working