I have a python app running on port 5000, and Caddy running on port 80. I’m trying to make a reverse proxy, but when I call http://127.0.0.1/soc it shows me the index.html page from the projeto_html folder, and not the page from the python app running on port 5000.
2. Error messages and/or full log output:
No error message. Only, the app running on port 5000 doesn’t shows.
First, try_files has a higher directive order than reverse_proxy, so it always runs first and rewrites the request because the file doesn’t exist on disk.
Second, your matcher is /soc/*, which doesn’t match /soc.
You should use handle to make it mutually exclusive:
If you plan on running your server long-term, don’t run caddy run directly, run Caddy as a service (and move your files to /srv since the service won’t have access to /home):