Hello,
I am quite new to Caddy. I am currently using Caddy for reverse proxy and would now want to use it as a webserver for a website of mine that is running on a different virtual machine on the same network.
1. Caddy version (caddy version
): v2.2.1
2. How I run Caddy:
I am running Caddy on a virtual machine.
a. System environment:
VM is running Ubuntu 20.04 LTS
d. My complete Caddyfile or JSON config:
Refer to the Caddy docs for more information:
The Caddyfile — Caddy Documentation
vpn.pttxfre.local {
reverse_proxy https://10.222.0.50 {
transport http {
tls_insecure_skip_verify
}
}
}
utode.pttxfre.com {
reverse_proxy {
to https://10.222.0.4
transport http {
tls_insecure_skip_verify
}
}
}
3. The problem I’m having:
I would want to use it as a webserver for a website of mine whose application files are on a different virtual machine on the same network. How do I properly configure the Caddyfile so that I can use the Caddy webserver to run that website that is on another computer on the same network?
My website is seated on a VM whose IP is 10.222.0.12 running on a certain port 5000.
Location of website files is /home/pttxfre/mypttxfre
My Caddy server is on the same network with an IP 10.222.0.20
This is the configuration that I have come up with and would like to add to my Caddyfile but am not so sure bout it
10.222.0.12:5000 { //ip and port for the website
root * /home/pttxfre/mypttxfre //location of website files
file_server
}
What could be the correct configuration?
Thanks