Problem ulimit and non working proxy

Hello guys,

I have a webserver running on localhost:8080 all I need is for it to be redirected on a SSL/TLS (443) on my domain name.

So I have tried many CaddyFile configuration but none work and I always get the ulimit problem (how do I fix the warning ??)

IMHO most logic caddyfile should be: {
proxy / {

But it doesn’t work

Hi @Tatch_Capital, welcome to the Caddy community.

Just for clarification - you use the term redirected here (which has a very specific meaning), but further down you use proxy. Do you want:

  1. Someone browsing to on HTTP(S) to be redirected to your server on port 8080, or;
  2. Someone browsing to your server on port 8080 to be redirected to, or;
  3. Someone browsing to on HTTP(S) to be served content from your server on port 8080?

Your provided Caddyfile example would indeed suit option 3. There aren’t any syntactic problems with it that I can see.

You can fix file descriptor warnings by using the command given in the error string (ulimit -n 8192). This is temporary to the shell you’re using, but when Caddy is being run from that shell it will inherit the new limit.

Here’s a good reference for setting the file descriptor limits with a little more permanence: How do I change the number of open files limit in Linux? - Stack Overflow

If you’re using an init system to run Caddy, you can probably use it to set the ulimit as part of the service definition.

To help me understand exactly what’s gone wrong, could you elaborate on:

  1. What were you trying to do when it broke?
  2. What did you expect to happen?
  3. What actually happened instead?

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