1. Output of caddy version
:
v2.6.2 h1:wKoFIxpmOJLGl3QXoo6PNbYvGW4xLEgo32GPBEjWL8o=
2. How I run Caddy:
a. System environment:
Ubuntu Linux 20.04.5
b. Command:
Paste command here.
c. Service/unit/compose file:
Paste full file contents here.
Make sure backticks stay on their own lines,
and the post looks nice in the preview pane. -->
d. My complete Caddy config:
My Caddyfile :
myname.com {
reverse_proxy localhost:10000
}
red.myname.com {
reverse_proxy localhost:1880
}
grafana.myname.com {
reverse_proxy localhost:3000
}
db.myname.com{
reverse_proxy localhost:8086
}
3. The problem I’m having:
- I have a VM in the cloud running Node Red and Caddy.
- Caddy works perfectly for the web interface.
- I have a node listening for HTTP POST attempts.
- The address for the Node Red site is red.myname.com
- The Node Red is listing on /upload
- I want to use HTTP POST to upload a file to Node Red
- When posting to this site I am getting a HTTP Response code 308 (Permanent Redirect).
- The data is not showing up in Node Red.
I have set up an identical Node Red instance locally and the HTTP POST works correctly. This shows that the reason for the failure is my inability to configure Caddy correctly.
I have a very basic configuration using the Caddyfile which works fine for the Node Red web interface (and Webmin) so it looks like Caddy is working correctly, I just need to update the configuration to accept the HTTP POST.
4. Error messages and/or full log output:
Paste logs/commands/output here.
USE THE PREVIEW PANE TO MAKE SURE IT LOOKS NICELY FORMATTED.
5. What I already tried:
I have read through the documentation and I have tried added the POST option to my Caddy file, like this:
red.myname.com {
@post method POST
reverse_proxy @post localhost:1880
}
To be honest, I’m unsure what this actually does or how it works, but it did not resolve the issue and broke access to the web interface.
I am using ARC on my PC to test the connection.
Any help to get this working would be much appreciated. I feel there is something simple and obvious which I am missing!
Please let me know if I have missed any useful information.