I’m using " nextcloud-aio-apache" as “host name” to connect from mastercontainer to apache, and it works (see bottom of post #1). That may help you eventually.
reverse_proxy nextcloud-aio-apache:{$APACHE_PORT}
I don’t know if such an approach is ok, hope someone can elaborate.
The docker logs for the nextcloud docker container seems to have startup correctly. I am not home right now but ssh with portforwarding either port 80 or 8443 does not work. I dont see 80 or 8443 for nextcloud on the pi itself when running ss -tulpn, however i do see it in the docker container itself.
If your server has port 80 and 8443 open and you point a domain to your server, you can get a valid certificate automatically by opening the Nextcloud AIO Interface via:
https://your-domain-that-points-to-this-server.tld:8443
{"level":"info","ts":1707213915.8289025,"msg":"using provided configuration","config_file":"/Caddyfile","config_adapter":""}
[06-Feb-2024 10:05:16] NOTICE: fpm is running, pid 111
[06-Feb-2024 10:05:16] NOTICE: ready to handle connections
[Tue Feb 06 10:05:16.419054 2024] [mpm_event:notice] [pid 105:tid 281473796702304] AH00489: Apache/2.4.58 (Unix) OpenSSL/3.1.4 configured -- resuming normal operations
[Tue Feb 06 10:05:16.419285 2024] [core:notice] [pid 105:tid 281473796702304] AH00094: Command line: 'httpd -D FOREGROUND'
Total reclaimed space: 0B
Okay so i also tried @CloudyFH solution which also did not work for me when setting either the host name or with the ip and same for {$APACHE_PORT}
or the actual port which is 11000 in my case. And with did not work i mean when i try to go to the url i only get a blank screen. If i try to forward the port 8080 i get
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>400 Bad Request</title>
</head><body>
<h1>Bad Request</h1>
<p>Your browser sent a request that this server could not understand.<br />
Reason: You're speaking plain HTTP to an SSL-enabled server port.<br />
Instead use the HTTPS scheme to access this URL, please.<br />
</p>
<hr>
<address>Apache/2.4.58 (Unix) Server at localhost Port 8080</address>
</body></html>
You may post your full compose.yaml and Caddyfile for an exact view on your setup.
You may add
{
debug
}
on top of your Caddyfile, to get full logs.
And you may use the “curl” command to check the connections, instead of a browser, to get more specific output. Clear the docker logs before each connection check to get only the related ones.