Code Monkey home page Code Monkey logo

Comments (5)

lucaslorentz avatar lucaslorentz commented on July 3, 2024

Hey @soakes

It was meant to be written as:

caddy.redir: "302"
caddy.redir.if: "{path} is /"
caddy.redir./: "/blog"

But this also works:

caddy.redir: 302
caddy.redir._0: "if {path} is /"
caddy.redir._1: "/ /blog"

And even this works (when using YAML):

caddy.redir: |
  302 {
    if {path} is /
    / /blog
  }

Can you please try the options above?

from caddy-docker-proxy.

lucaslorentz avatar lucaslorentz commented on July 3, 2024

About the external proxy. Can you please describe how it is related to the domain?
Should /blog proxy to your docker container, and everything else to an external url?

from caddy-docker-proxy.

soakes avatar soakes commented on July 3, 2024

@lucaslorentz thank you very much for the in-depth examples, this is a great help thank you.
With regards to the external proxy, in short, I have several VPN's connected to several different locations. I am currently using the same caddy proxy to reverse proxy apps/vm's which are behind the VPN's as well as the usual docker apps etc from the main data center networks.

So for example, say vmware is running on another location which is accessible via VPN only (usually), this can be reverse proxied as well which the first last snippet is what I do which works great, however, I was struggling to do it via your awesome plugin.

HTH

from caddy-docker-proxy.

hijak avatar hijak commented on July 3, 2024

@soakes this would work

caddy.address: example.me.uk/blog
caddy.targetport: 2368
caddy.proxy: "/blog example_blog:2368"
caddy.proxy.websocket:
caddy.proxy.transparent:
caddy.redir: "302"
caddy.redir.if: "{path} is /"
caddy.redir./: "/blog"

from caddy-docker-proxy.

soakes avatar soakes commented on July 3, 2024

Thanks Jack.

from caddy-docker-proxy.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.