Hi,
I have nuxtjs app, then I like to use the reverse proxy so that I can access to port 80 , when I access it to my local development https://nuxtnew.condomain.local
it will only show a black screen. I posted the logs below.
please help thank you in advance.
caddy:
image: caddy:latest
container_name: caddy-breeze
restart: unless-stopped
ports:
- "80:80"
- "443:443"
volumes:
- caddy_data:/data
- caddy_config:/config
- ./Caddyfile:/etc/caddy/Caddyfile
networks:
- mynetwork
node:
container_name: nuxtnew_container
build:
context: ../nuxt/mynuxt
dockerfile: ../mynuxt/docker/node.dockerfile
target: development
image: nodenuxtnew
ports:
- "4000:4000"
volumes:
- caddy_data:/data
- caddy_config:/config
- ../nuxt/mynuxt:/usr/local/app
- node_modules:/usr/local/app/node_modules
command: dev
working_dir: /usr/local/app
networks:
- mynetwork
Caddyfile
nuxtnew.condomain.local {
reverse_proxy nuxtnew_container:4000
}
In my nuxt.config.ts I have this
export default defineNuxtConfig({
compatibilityDate: '2024-04-03',
devtools: { enabled: false },
devServer: {
port: 4000,
host: '0.0.0.0',
https:true
},
})
This is the error
mysql-breeze | 2024-07-13 03:17:57+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'
mysql-breeze | 2024-07-13 03:17:57+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.4.1-1.el9 started.
mysql-breeze | '/var/lib/mysql/mysql.sock' -> '/var/run/mysqld/mysqld.sock'
mysql-breeze | 2024-07-13T03:17:58.604332Z 0 [System] [MY-015015] [Server] MySQL Server - start.
mysql-breeze | 2024-07-13T03:17:58.863123Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.4.1) starting as process 1
mysql-breeze | 2024-07-13T03:17:58.897340Z 0 [Warning] [MY-010159] [Server] Setting lower_case_table_names=2 because file system for /var/lib/mysql/ is case insensitive
mysql-breeze | 2024-07-13T03:17:58.956722Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
mysql-breeze | 2024-07-13T03:18:02.133583Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
nuxtnew_container | ℹ Vite client warmed up in 4199ms
nuxtnew_container | ℹ Vite server warmed up in 4008ms
mysql-breeze | 2024-07-13T03:18:04.201626Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.
mysql-breeze | 2024-07-13T03:18:04.201734Z 0 [System] [MY-013602] [Server] Channel mysql_main configured to support TLS. Encrypted connections are now supported for this channel.
mysql-breeze | 2024-07-13T03:18:04.230983Z 0 [Warning] [MY-011810] [Server] Insecure configuration for --pid-file: Location '/var/run/mysqld' in the path is accessible to all OS users. Consider choosing a different directory.
mysql-breeze | 2024-07-13T03:18:04.339499Z 0 [System] [MY-011323] [Server] X Plugin ready for connections. Bind-address: '::' port: 33060, socket: /var/run/mysqld/mysqlx.sock
mysql-breeze | 2024-07-13T03:18:04.339732Z 0 [System] [MY-010931] [Server] /usr/sbin/mysqld: ready for connections. Version: '8.4.1' socket: '/var/run/mysqld/mysqld.sock' port: 3306 MySQL Community Server - GPL.
nuxtnew_container | [nitro] ✔ Nuxt Nitro server built in 1321 ms
caddy-breeze | {"level":"error","ts":1720840696.3704572,"logger":"http.log.error","msg":"EOF","request":{"remote_ip":"192.168.65.1","remote_port":"45384","client_ip":"192.168.65.1","proto":"HTTP/2.0","method":"GET","host":"nuxtnew.condomain.local","uri":"/","headers":{"Sec-Fetch-Dest":["document"],"Priority":["u=0, i"],"Te":["trailers"],"User-Agent":["Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:128.0) Gecko/20100101 Firefox/128.0"],"Accept":["text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/png,image/svg+xml,*/*;q=0.8"],"Accept-Language":["en-US,en;q=0.5"],"Sec-Fetch-Site":["none"],"Sec-Fetch-User":["?1"],"Accept-Encoding":["gzip, deflate, br, zstd"],"Upgrade-Insecure-Requests":["1"],"Sec-Fetch-Mode":["navigate"]},"tls":{"resumed":false,"version":772,"cipher_suite":4865,"proto":"h2","server_name":"nuxtnew.condomain.local"}},"duration":0.0044292,"status":502,"err_id":"me8421vnx","err_trace":"reverseproxy.statusError (reverseproxy.go:1269)"}
caddy-breeze | {"level":"error","ts":1720840696.44825,"logger":"http.log.error","msg":"EOF","request":{"remote_ip":"192.168.65.1","remote_port":"45384","client_ip":"192.168.65.1","proto":"HTTP/2.0","method":"GET","host":"nuxtnew.condomain.local","uri":"/favicon.ico","headers":{"Sec-Fetch-Dest":["image"],"Sec-Fetch-Site":["same-origin"],"Referer":["https://nuxtnew.condomain.local/"],"Accept":["image/avif,image/webp,image/png,image/svg+xml,image/*;q=0.8,*/*;q=0.5"],"Accept-Language":["en-US,en;q=0.5"],"Accept-Encoding":["gzip, deflate, br, zstd"],"Sec-Fetch-Mode":["no-cors"],"Priority":["u=6"],"Te":["trailers"],"User-Agent":["Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:128.0) Gecko/20100101 Firefox/128.0"]},"tls":{"resumed":false,"version":772,"cipher_suite":4865,"proto":"h2","server_name":"nuxtnew.condomain.local"}},"duration":0.0024514,"status":502,"err_id":"xam445yrn","err_trace":"reverseproxy.statusError (reverseproxy.go:1269)"}