Hi everyone!
So im new to caddy, and i’d like to do the following -
1. The problem I’m having:
I want to reverse proxy from one LAN (say, my client is using firefox and coming from 1.1.1.X) to a webpage in another LAN (say, in the net 2.2.2.X).
The server and the client have dont have direct access to eachother, but my caddy server has access to both nets. My current configuration wont work, and im wondering why?
An important side note would be that when i’m adding the server’s net access to the client it works, but if i dont - i cant seem to reach the webpage.
What can i do to solve this? is it possible?
Here is my current code - please let me know what i should add / remove change - and what is needed / whats not.
2. Error messages and/or full log output:
N/A - didnt really see anything.
3. Caddy version:
2.8.4
4. How I installed and ran Caddy:
from the official site
a. System environment:
Ubuntu 24.04
b. Command:
N/A
c. Service/unit/compose file:
N/A
d. My complete Caddy config:
:80 { # Basic logging log {
output file /var/log/caddy/access.log
format console } # Handle all incoming requests
handle /* {
reverse_proxy { # Target backend server in 10.10.10.X network to 2.2.2.200:80 # Preserve original host header header_up Host {host} # Add forwarding headers header_up X-Real-IP {remote_host} header_up X-Forwarded-For {remote_host} header_up X-Forwarded-Proto {scheme} } }
Thanks in advance!