The following is written in version 1 configuration:
proxy /pluto https://pluto.web.telegram.org {
without /pluto
}
proxy /venus https://venus.web.telegram.org {
without /venus
}
Request assistance in rewriting to version 2
Thx
The following is written in version 1 configuration:
proxy /pluto https://pluto.web.telegram.org {
without /pluto
}
proxy /venus https://venus.web.telegram.org {
without /venus
}
Request assistance in rewriting to version 2
Thx
Hi Arti, welcome back –
Our upgrade guide should help you out: Upgrading to Caddy 2 — Caddy Documentation
Hi,
I tried it, and I did the following.
route /venus/* {
uri strip_prefix /venus
reverse_proxy https://venus.web.telegram.org
}
route /pluto/* {
uri strip_prefix /pluto
reverse_proxy https://pluto.web.telegram.org
}
but it doesn’t work.
What didn’t work? We can’t help unless you’re more specific about the issues you’re encountering.
Version 1 with configuration:
webogram.choodique.me {
root /home/choo/apps/caddy/webogram/www
log /home/choo/apps/caddy/webogram/logs/webogram.log
errors /home/choo/apps/caddy/webogram/logs/webogram.err
header / {
X-Frame-Options "sameorigin"
}
proxy /pluto https://pluto.web.telegram.org {
without /pluto
}
proxy /venus https://venus.web.telegram.org {
without /venus
}
proxy /aurora https://aurora.web.telegram.org {
without /aurora
}
proxy /vesta https://vesta.web.telegram.org {
without /vesta
proxy /vesta https://vesta.web.telegram.org {
without /vesta
}
proxy /flora https://flora.web.telegram.org {
without /flora
}
proxy /pluto-1 https://pluto-1.web.telegram.org {
without /pluto-1
}
proxy /venus-1 https://venus-1.web.telegram.org {
without /venus-1
}
proxy /aurora-1 https://aurora-1.web.telegram.org {
without /aurora-1
}
proxy /vesta-1 https://vesta-1.web.telegram.org {
without /vesta-1
}
proxy /flora-1 https://flora-1.web.telegram.org {
without /flora-1
}
}
Works - the site answers, you can login and use, everything works.
Version 2 with configuration:
webogram.choodique.me {
root * /usr/share/caddy/webogram/www
header {
X-Frame-Options SAMEORIGIN
}
route /venus/* {
uri strip_prefix /venus
reverse_proxy https://venus.web.telegram.org
}
route /pluto/* {
uri strip_prefix /pluto
reverse_proxy https://pluto.web.telegram.org
}
route /aurora/* {
uri strip_prefix /aurora
reverse_proxy https://aurora.web.telegram.org
...
file_server
}
Loads ONLY the first page, authorization does not work, etc.
P.S. In dirs home/choo/apps/caddy/webogram/www & /usr/share/caddy/webogram/www - Identical files are located
P.P.S. Version 1 Caddy server launch as standalone app, Version 2 Caddy launch as docker container
docker-compose.yaml:
version: ‘3’
services:
caddy:
image: caddy:alpine
container_name: caddy
ports:
- 80:80
- 443:443
environment:
- PUID=1000
- GUID=1000
volumes:
- ./config/Caddyfile:/etc/caddy/Caddyfile
- ./data:/data
- ./sites:/usr/share/caddy
networks:
- web
networks:
web:
external: true
I don’t understand what that means. Please be more specific.
What URLs are you trying to load? What happens? Any errors in the logs? Can you use curl -v
to show what a request looks like?
You can add access logs to your Caddyfile by adding the log
directive (no arguments) which will output to stdout.
You can check your logs with docker-compose logs caddy
Maybe I’ll try to reformulate the question.
How to do:
query webogram.choodique.me/venus/apiw1 caddy proxied them to Telegram APIs
sorry about my “English”
That’s still not enough information. What isn’t working? What happens instead? What are you seeing in your logs?
This topic was automatically closed after 30 days. New replies are no longer allowed.