Shopify - reverse proxy

1. Caddy version (2):

V2

2. How I run Caddy:

I need info/examples

a. System environment:

Linux Red Hat

b. Command:

c. Service/unit/compose file:

d. My complete Caddyfile or JSON config:

3. The problem I’m having:

I need information / documentation. I want to set up a reverse proxy. Shopify has Web Triggers - REST API which will call your REST API when certain events occur, and I want this web trigger to call Caddy and Caddy - external web server to pass the call to my internal webserver. So I need information and examples on how to set up my Caddy to receive REST API calls and forward these calls to my internal webserver. So far I have not found this information or more likely I don’t know what I am looking at. Can someone point me at this information so at least I know I am looking at the right information?

4. Error messages and/or full log output:

5. What I already tried:

6. Links to relevant resources:

All the info you need is in the docs:

1 Like

Maybe for someone who knows what they are doing the instructions are fine, but for me the instructions don’t get me anywhere.
For example
caddy reverse-proxy --to 127.0.0.1:9000

When I browse to the server after I run the command I get
http: TLS handshake error from 10.200.250.58:52643: no certificate available
and then when I search for “no certificate available”
I get
{
“certificate”: “”,
“private_key”: “”,
“format”: “”
}

with no explanation what do I do with this or where do I put that.
So to me the example does not work. I would like working examples.

This might be self explanatory for you, but for me it does not help.
The Caddy’s documentation is like a dictionary it defines every term, but try putting that in a sentence or conversation and you have no clue how to say it.

Thanks for the feedback.

So, yeah, I had this conversation yesterday with a friend in the medical field. She was complaining because the documentation for the R packages she uses does not help her to use the packages. As we talked it became clear that the R package documentation was doing its job: it was documenting how that R package works (she said it was very long and thorough) but wasn’t written for someone like her in a non-programming/sysadmin (but still technical) field who does not have requisite background knowledge. Unfortunately, her employer did not train her how to use her computer, and she has few resources available to her to learn. In the end, we both agreed on the conclusion that you can’t do well in a technical field and use technical tools without having good understanding of how the technical tools work.

It is the same with Caddy and any other web server. This is not a beginners tool. It requires a knowledge of networking and the Internet works. It is not the job of the Caddy documentation to teach you how the Internet works. That is the job of books, online tutorials, universities, and maybe random blog posts on the Internet (though they will usually not be as good).

I could take a year off and just write blog posts and tutorials about how the Internet works, but wouldn’t you rather I spend it on development? (I know that my sponsors and employer want me to develop Caddy, not write about things there are already countless books and courses for.)

Use curl to try your request instead. Web browsers are unpredictable and do all sorts of funky things. Make sure you’re making an HTTP request, not HTTPS.

The examples in the documentation do work, it goes back to knowing how to use your computer, and the basics of how the Internet works.

The Reference documentation is, yes, and that’s its job. The rest of the docs are articles and tutorials which do tell you how to put the pieces together. But you still have to know how to use your computer, how network stacks work, how your OS works, etc.