1. The problem I’m having:
Get an SSL certificate when ports 80 and 443 are unavailable on OpenVZ
I installed the X-UI panel on a VPS with OpenVZ Debian 10 OS.
IP is not personal. Only ports 15800-15820 are available.
By http://name.ru:port the panel opens. The task is to configure SSL for the domain.
I installed caddy, it seems to issue SSL automatically when I try to access http://name.ru:port
But not in my case, because... 443 is not available.
2. Error messages and/or full log output:
The command does not work: journalctl -u caddy --no-pager | less +G`
3. Caddy version:
root@xui:~# caddy version
v2.7.5 h1:HoysvZkLcN2xJExEepaFHK92Qgs7xAiCFydN5x5Hs6Q=
4. How I installed and ran Caddy:
apt install -y debian-keyring debian-archive-keyring apt-transport-https curl
curl -1sLf ‘https://dl.cloudsmith.io/public/caddy/stable/gpg.key’ \
/etc/apt/trusted.gpg.d/caddy-stable.asc
curl -1sLf ‘https://dl.cloudsmith.io/public/caddy/stable/debian.deb.txt’ \
/etc/apt/sources.list.d/caddy-stable.list
echo “deb [trusted=yes] https://apt.fury.io/caddy/ /” \ | tee -a /etc/apt/sources.list.d/caddy-fury.list
apt update
sudo apt install caddy
a. System environment:
Debian 10 Minimal Installing whithout docker
b. Command:
systemctl start caddy
c. Service/unit/compose file:
d. My complete Caddy config:
:80 {
# Set this path to your site's directory.
root * /usr/share/caddy
# Enable the static file server.
file_server
# Another common task is to set up a reverse proxy:
# reverse_proxy localhost:8080
# Or serve a PHP site through php-fpm:
# php_fastcgi localhost:9000
}