question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

nginx-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):

image

But, hitting the URL https://mydomain.com in the browser returns HTTP 500:

image

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:closed
  • Created a year ago
  • Comments:6

github_iconTop GitHub Comments

2reactions
DatAres37commented, Apr 23, 2022

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.

0reactions
averricommented, Apr 23, 2022

I see that the default log level used in the Nginx configuration is notice, as we can see in the /etc/nginx/nginx.conf:

error_log  /var/log/nginx/error.log notice;

Is it possible to change the log level in nginx-proxy?

Read more comments on GitHub >

github_iconTop Results From Across the Web

error in php not logging or displaying - Server Fault
In the past, I had no error logs in two cases: The user under which Apache was running had no permissions to modify...
Read more >
Access and Error Logs - The Ultimate Guide To Logging - Loggly
Access and Error Logs. Log Files. An Apache log is a record of the events that have occurred on your Apache web server....
Read more >
No error logs in /var/log/nginx/error.log [nginx] - Stack Overflow
Till now, I have been using logging module of python to log data but obviously I had to figure out the problem. When...
Read more >
No Error logging | WordPress.org
In the settings I have checked the enable/disable logging; checked to receive an email for every 404 log which seems to be working...
Read more >
No Error Log File, no debug info - WordPress Stack Exchange
In my case, I use XAMPP to host WordPress, the log will be in Apache's error.log instead even I have wp-config.php configured. XAMPP...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found