I would like help on translating the Nginx config for Pterodactyl into a Caddy config.
I am trying to translate it the Nginx config for Pterodactyl into a Caddyfile by learning from the docs, but it turns out that there are certain elements in the Nginx config that can only be done in the JSON format of Caddy configs instead of a Caddyfile, which is where it got too complex for my level. The Nginx adapter for Caddy also doesn’t support some of the elements from the Nginx config.
Therefore, could anyone help me translate this Nginx config below into a Caddy config? I am using the latest release of Caddy on Debian 10 as TaaS.
Wow, thanks a lot! I must’ve been blind because I wasn’t able able to differentiate between things like header and add_header in the configs and docs. So I assumed that I had to read on the full JSON config to get such features. It turns out that Caddyfiles are more powerful than I thought!
Heh, yeah. That’s what I’d intended to say - perhaps it was ambiguous to say “Caddy” instead of “the Caddyfile”, but the truth is the Caddyfile will handle everything needed for 99/100 people
I just tried this config, and there is this weird issue where it shows the Caddy page when I first visit the website, but when I refresh it it prompts me to download .dms. I tried restarting Caddy and the server. How could I solve this? You can see it at burnodactyl.marwanamireh.me.
I’m not sure if there’s an issue with the translation or something, but every time I visit the website, I just get prompted download a .DMS file with my domain name instead of viewing anything. I never got it working. It doesn’t happen when using the Nginx config I posted.
You’ll need to elaborate, I don’t think it’s clear what the problem is. What’s your full config? What do you see in your logs? What does a request look like? Can you try with curl -v to see what the request/response looks like when outside of a browser?