1. The problem I’m having:
Im using shared hosting that provides a caddy server. On the caddy server im using NamelessMC CMS. Everything works fine at this point. When I install a custom template on Nameless, it uses their API to create widgets. These widgets are not working, Which Ive been told is due to something with proxies.
So after much research, Im led to believe that its because of the port and http/https. I look in my console and see the error below.
From what im reading Im suppose to put my domain in the caddy file for it to auto resolve this issue, however I THINK I have tried this with no luck, although my file is quite confusing. Please let me know if you have any advice.
2. Error messages and/or full log output:
http.auto_https server is listening only on the HTTP port, so no automatic HTTPS will be applied to this server {"server_name": "srv0", "http_port": 25566}
3. Caddy version:
I’ve ran both ‘caddy version’ and ‘docker-compose exec caddy caddy version’ and neither of those commands in my console return a caddy version. I can say that the readme file says V2 although I know that’s not acceptable.
4. How I installed and ran Caddy:
My shared host ‘bloom.host’ has provided the caddy installation for me.
My domain is ‘saltwaterscourge.com’
a. System environment:
My console says its pulling from docker container pterodactyl from
‘Package pterodactyl-caddy · GitHub’
b. Command:
My /start.sh file contains
#!/bin/ash
echo "Starting PHP-FPM..."
PHP_FPM=$(find /usr/sbin -name "php-fpm*" -type f | tail -n 1)
$PHP_FPM --fpm-config /home/container/php-fpm/php-fpm.conf -c /home/container/php-fpm/ --daemonize
echo "Starting Caddy..."
./caddy-server run --watch --config ./caddy/Caddyfile
c. Service/unit/compose file:
I dont believe I have access to this
d. My complete Caddy config:
{
http_port 25566
https_port 25566
admin off
}
(namelessmc) {
@nameless-blocked path_regexp \.(tpl|cache)$
route @nameless-blocked {
respond "Page forbidden." 403
}
try_files {path} /index.php?route={path}&{query}
}
# You can replace :<port> with a domain such as "example.com", to where only requests from that host will be routed.
:25566 {
root * /home/container/public
file_server
encode zstd gzip
php_fastcgi unix//tmp/php-fpm.sock
import namelessmc
}