1. My Caddy version (caddy version
):
Unsure on exact caddy version. Currently running the abiosoft/caddy docker image through docker compose.
2. How I run Caddy:
Docker Compose with abiosoft/caddy image
a. System environment:
Debian (Specifically, the DietPi VirtualBox flavor)
b. Compose file:
version: '3.6'
services:
# Server
server:
image: abiosoft/caddy
container_name: caddy
restart: always
volumes:
- ./Caddyfile:/etc/Caddyfile
- ./.caddy:/root/.caddy
ports:
- 2015:2015
- 80:80
- 443:443
# Maria Database
db:
image: mariadb
environment:
- MYSQL_ROOT_PASSWORD=REDACTED
volumes:
- /mnt/dietpi_userdata/docker-compose/mariadb:/var/lib/mysql
restart: unless-stopped
# Database Management
adminer:
image: adminer
restart: always
ports:
- 8080:8080
depends_on:
- db
d. My complete Caddyfile or JSON config:
proxy localhost localhost:8080
3. The problem I’m having:
Pretty new to Caddy. Basically for now in my VM testing sandbox, I have a service, Adminer, on port 8080. What I would like to happen is I type “localhost” in my address bar and it takes me to “localhost:8080”. Eventually I would like to have it so that I enter “DOMAIN FOR SALE” and it takes me to the service. However, if I can’t get a basic localhost reverse proxy to work, I don’t think I can get a more advanced config to work
4. Error messages and/or full log output:
The log output when I hit “docker-compose up” (apologies, it looks messy. Not sure how to properly format it):
Creating caddy ... done
Creating docker-compose_db_1 ... done
Creating docker-compose_adminer_1 ... done
Attaching to docker-compose_db_1, caddy, docker-compose_adminer_1
db_1 | 2020-03-16 17:17:46+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 1:10.4.12+maria~bionic started.
caddy | Activating privacy features... 2020/03/16 17:17:45 [INFO][cache:0xc000032780] Started certificate maintenance routine
caddy | 2020/03/16 17:17:46 [INFO][proxy] Obtain certificate
caddy | 2020/03/16 17:17:46 [INFO] [proxy] acme: Obtaining bundled SAN certificate
caddy | 2020/03/16 17:17:46 [ERROR][proxy] failed to obtain certificate: acme: error: 400 :: POST :: https://acme-v02.api.letsencrypt.org/acme/new-order :: urn:ietf:params:acme:error:rejectedIdentifier :: Error creating new order :: Cannot issue for "proxy": Domain name needs at least one dot, url: (attempt 1/3; challenge=tls-alpn-01)
db_1 | 2020-03-16 17:17:47+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'
db_1 | 2020-03-16 17:17:47+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 1:10.4.12+maria~bionic started.
adminer_1 | [Mon Mar 16 17:17:47 2020] PHP 7.4.3 Development Server (http://[::]:8080) started
caddy | 2020/03/16 17:17:47 [INFO] [proxy] acme: Obtaining bundled SAN certificate
db_1 | 2020-03-16 17:17:47 0 [Note] mysqld (mysqld 10.4.12-MariaDB-1:10.4.12+maria~bionic) starting as process 1 ...
db_1 | 2020-03-16 17:17:47 0 [Note] InnoDB: Using Linux native AIO
db_1 | 2020-03-16 17:17:47 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
db_1 | 2020-03-16 17:17:47 0 [Note] InnoDB: Uses event mutexes
db_1 | 2020-03-16 17:17:47 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
db_1 | 2020-03-16 17:17:47 0 [Note] InnoDB: Number of pools: 1
db_1 | 2020-03-16 17:17:47 0 [Note] InnoDB: Using SSE2 crc32 instructions
db_1 | 2020-03-16 17:17:47 0 [Note] mysqld: O_TMPFILE is not supported on /tmp (disabling future attempts)
caddy | 2020/03/16 17:17:47 [ERROR][proxy] failed to obtain certificate: acme: error: 400 :: POST :: https://acme-v02.api.letsencrypt.org/acme/new-order :: urn:ietf:params:acme:error:rejectedIdentifier :: Error creating new order :: Cannot issue for "proxy": Domain name needs at least one dot, url: (attempt 2/3; challenge=tls-alpn-01)
db_1 | 2020-03-16 17:17:47 0 [Note] InnoDB: Initializing buffer pool, total size = 256M, instances = 1, chunk size = 128M
db_1 | 2020-03-16 17:17:47 0 [Note] InnoDB: Completed initialization of buffer pool
db_1 | 2020-03-16 17:17:47 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
db_1 | 2020-03-16 17:17:47 0 [Note] InnoDB: 128 out of 128 rollback segments are active.
db_1 | 2020-03-16 17:17:47 0 [Note] InnoDB: Creating shared tablespace for temporary tables
db_1 | 2020-03-16 17:17:47 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
db_1 | 2020-03-16 17:17:47 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
db_1 | 2020-03-16 17:17:47 0 [Note] InnoDB: Waiting for purge to start
db_1 | 2020-03-16 17:17:47 0 [Note] InnoDB: 10.4.12 started; log sequence number 61197; transaction id 21
db_1 | 2020-03-16 17:17:47 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
db_1 | 2020-03-16 17:17:47 0 [Note] Plugin 'FEEDBACK' is disabled.
db_1 | 2020-03-16 17:17:47 0 [Note] Server socket created on IP: '::'.
db_1 | 2020-03-16 17:17:48 0 [Note] InnoDB: Buffer pool(s) load completed at 200316 17:17:48
db_1 | 2020-03-16 17:17:48 0 [Warning] 'proxies_priv' entry '@% root@1172df8fa6be' ignored in --skip-name-resolve mode.
db_1 | 2020-03-16 17:17:48 0 [Note] Reading of all Master_info entries succeeded
db_1 | 2020-03-16 17:17:48 0 [Note] Added new Master_info '' to hash table
db_1 | 2020-03-16 17:17:48 0 [Note] mysqld: ready for connections.
db_1 | Version: '10.4.12-MariaDB-1:10.4.12+maria~bionic' socket: '/var/run/mysqld/mysqld.sock' port: 3306 mariadb.org binary distribution
caddy | 2020/03/16 17:17:48 [INFO] [proxy] acme: Obtaining bundled SAN certificate
caddy | 2020/03/16 17:17:48 [ERROR][proxy] failed to obtain certificate: acme: error: 400 :: POST :: https://acme-v02.api.letsencrypt.org/acme/new-order :: urn:ietf:params:acme:error:rejectedIdentifier :: Error creating new order :: Cannot issue for "proxy": Domain name needs at least one dot, url: (attempt 3/3; challenge=tls-alpn-01)
caddy | 2020/03/16 17:17:49 [INFO] [proxy] acme: Obtaining bundled SAN certificate
caddy | 2020/03/16 17:17:49 [ERROR][proxy] failed to obtain certificate: acme: error: 400 :: POST :: https://acme-v02.api.letsencrypt.org/acme/new-order :: urn:ietf:params:acme:error:rejectedIdentifier :: Error creating new order :: Cannot issue for "proxy": Domain name needs at least one dot, url: (attempt 1/3; challenge=http-01)
caddy | 2020/03/16 17:17:50 [INFO] [proxy] acme: Obtaining bundled SAN certificate
caddy | 2020/03/16 17:17:50 [ERROR][proxy] failed to obtain certificate: acme: error: 400 :: POST :: https://acme-v02.api.letsencrypt.org/acme/new-order :: urn:ietf:params:acme:error:rejectedIdentifier :: Error creating new order :: Cannot issue for "proxy": Domain name needs at least one dot, url: (attempt 2/3; challenge=http-01)
caddy | 2020/03/16 17:17:51 [INFO] [proxy] acme: Obtaining bundled SAN certificate
caddy | 2020/03/16 17:17:52 [ERROR][proxy] failed to obtain certificate: acme: error: 400 :: POST :: https://acme-v02.api.letsencrypt.org/acme/new-order :: urn:ietf:params:acme:error:rejectedIdentifier :: Error creating new order :: Cannot issue for "proxy": Domain name needs at least one dot, url: (attempt 3/3; challenge=http-01)
caddy | 2020/03/16 17:17:53 failed to obtain certificate: acme: error: 400 :: POST :: https://acme-v02.api.letsencrypt.org/acme/new-order :: urn:ietf:params:acme:error:rejectedIdentifier :: Error creating new order :: Cannot issue for "proxy": Domain name needs at least one dot, url:
caddy | exit status 1
caddy exited with code 1
5. What I already tried:
I’ve searched the forum, followed examples and tutorials on the Caddy documentation to no avail. I can provide more info if needed. Hopefully this is an easy fix. Thanks!