No error logs!
See original GitHub issuenginx-proxy/nginx-proxy
is returning an HTTP 500 with no traces of errors. It has been very difficult to understand what is going on.
docker-compose.yaml
for the backend services:
version: '2.2'
services:
http-echo:
image: mendhak/http-https-echo:23
ports:
- "8585:8080"
network_mode: bridge
environment:
VIRTUAL_HOST: mydomain.com
VIRTUAL_PORT: 8585
LETSENCRYPT_HOST: mydomain.com
LETSENCRYPT_EMAIL: myemail@mydomain.com
docker-compose.yaml
for the nginx-proxy and the acme-companion:
version: '2.2'
services:
nginx-proxy:
image: nginxproxy/nginx-proxy
container_name: nginx-proxy
ports:
- "80:80"
- "443:443"
environment:
- HSTS=off
volumes:
- conf:/etc/nginx/conf.d
- vhost:/etc/nginx/vhost.d
- html:/usr/share/nginx/html
- dhparam:/etc/nginx/dhparam
- certs:/etc/nginx/certs:ro
- /var/run/docker.sock:/tmp/docker.sock:ro
network_mode: bridge
acme-companion:
image: nginxproxy/acme-companion
container_name: nginx-proxy-acme
volumes_from:
- nginx-proxy
volumes:
- certs:/etc/nginx/certs:rw
- acme:/etc/acme.sh
- /var/run/docker.sock:/var/run/docker.sock:ro
network_mode: bridge
environment:
DEFAULT_EMAIL: me@mydomain.com
volumes:
conf:
vhost:
html:
dhparam:
certs:
acme:
The container related to the image mendhak/http-https-echo:23
is responsible for echoing HTTP requests.
Start all containers above using docker-compose
.
Hitting the URL http://mydomain.com:8585 in the browser returns the HTTP echo correctly (it’s bypassing nginx-proxy, accessing the backend container directly, so this service is working fine):
But, hitting the URL https://mydomain.com in the browser returns HTTP 500:
There are no error logs in /var/log/nginx/error.log
.
Please let me how to enable error logs. It’s impossible to know what’s going on.
Issue Analytics
- State:
- Created a year ago
- Comments:6
The logs are the standard logs of your docker container.
Did you read the docs? You’re not even exposing any ports of your service.
I see that the default log level used in the Nginx configuration is
notice
, as we can see in the/etc/nginx/nginx.conf
:Is it possible to change the log level in
nginx-proxy
?