SteveLTN / https-portal

A fully automated HTTPS server powered by Nginx, Let's Encrypt and Docker.
MIT License
4.41k stars 295 forks source link

Logs are no longer output. #313

Open nrikiji opened 2 years ago

nrikiji commented 2 years ago

I keep a log of the proxy server container I created with http-portal.

After this log is output, the access log is no longer recorded.

Renewing ...
Renewal skipped for foo.bar, it expires at 31 days from now.
Renewal done.

Could you please let me know the cause of this and if there is a solution.

Also, here is my docker-compose.yml

services:
  https-portal:
    image: steveltn/https-portal:1
    restart: always
    logging:
      driver: syslog
      options:
        syslog-facility: daemon
        tag: http-portal/{{.Name}}/{{.ID}}
    ports:
      - '80:80'
      - '443:443'
    environment:
      TZ: Asia/Tokyo
      STAGE: 'production' # Don't use production until staging works
      DOMAINS: >-
        foo.bar -> http://foo-bar-web:8000,
      CLIENT_MAX_BODY_SIZE: 10M
      ERROR_LOG: stdout
      ACCESS_LOG: stderr
    volumes:
      - https-portal-data:/var/lib/https-portal
    networks:
      - foo-bar-nw
    depends_on:
      - foo-bar-web
SteveLTN commented 2 years ago

Hi! This is interesting. Likely to be a bug. I need to look into it.

nrikiji commented 2 years ago

Thank you. I don't see this being discussed so far, but I guess others aren't bothered...

SteveLTN commented 2 years ago

Hi, I played around with my containers, but don't see a similar issue. I notice that you pu ERROR_LOG: stdout and ACCESS_LOG: stderr. I wonder if this will make a difference.

nrikiji commented 2 years ago

Thank you. I had copied here without much thought... https://github.com/SteveLTN/https-portal/#logging-configuration

https-portal:
  # ...
  environment:
    ERROR_LOG: stderr
    ACCESS_LOG: stdout

Is this correct?

panasico commented 10 months ago

Same problem. Domains are not responding. After put ERROR_LOG: stdout and ACCESS_LOG: stderr logs contains:

Renewing ...
Renewal skipped for DOMAIN_1, it expires at 77 days from now.
Renewal skipped for DOMAIN_2, it expires at 77 days from now.
Renewal done.
SOME_CLIENT_IP - - [30/Aug/2023:06:15:58 +0000] "GET / HTTP/1.1" 444 0 "-" "-" "-"
SOME_CLIENT_IP - - [30/Aug/2023:06:15:58 +0000] "\x16\x03\x01\x00\xEE\x01\x00\x00\xEA\x03\x03\xC0G\x1F6Rg\xF8\x14\xC9~\x89!\x09\x00O\x00\x9DI&\xCA\x98\x8D\xA0[\x0F" 400 150 "-" "-" "-"
SOME_CLIENT_IP - - [30/Aug/2023:06:16:41 +0000] "GET / HTTP/1.1" 499 0 "-" "Mozilla/5.0 (compatible; YandexBot/3.0; +http://yandex.com/bots)" "-"
SOME_CLIENT_IP - - [30/Aug/2023:06:16:45 +0000] "GET / HTTP/2.0" 499 0 "-" "TelegramBot (like TwitterBot)" "-"
SOME_CLIENT_IP - - [30/Aug/2023:06:16:52 +0000] "GET / HTTP/2.0" 499 0 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:77.0) GSOME_CLIENT_IP - - [30/Aug/2023:06:17:03 +0000] "\x16\x03\x01\x00\x85\x01\x00\x00\x81\x03\x03\x83\xAB\xE4\xCD\x95\xB6\xA3\xD19\xC0\xA9\x82z\xDC[9\x8E'\xB15\x11m\xD9\x1D\x85\x98\xD3\xA7GL\xB96\x00\x00 \xC0/\xC00\xC0+\xC0,\xCC\xA8\xCC\xA9\xC0\x13\xC0\x09\xC0\x14\xC0" 400 150 "-" "-" "-"
SOME_CLIENT_IP - - [30/Aug/2023:06:17:43 +0000] "GET / HTTP/2.0" 499 0 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36" "-"
SOME_CLIENT_IP - - [30/Aug/2023:06:17:45 +0000] "GET / HTTP/2.0" 499 0 "-" "TelegramBot (like TwitterBot)" "-"
SOME_CLIENT_IP - - [30/Aug/2023:06:17:52 +0000] "GET / HTTP/2.0" 499 0 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.45 Safari/537.36" "-"
SOME_CLIENT_IP - - [30/Aug/2023:06:18:10 +0000] "GET / HTTP/2.0" 499 0 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36" "-"
SOME_CLIENT_IP - - [30/Aug/2023:06:18:46 +0000] "GET / HTTP/2.0" 499 0 "-" "TelegramBot (like TwitterBot)" "-"
SOME_CLIENT_IP - - [30/Aug/2023:06:18:48 +0000] "GET / HTTP/1.1" 499 0 "-" "Mozilla/5.0 (compatible; YandexBot/3.0; +http://yandex.com/bots)" "-"
SOME_CLIENT_IP - - [30/Aug/2023:06:18:53 +0000] "GET / HTTP/2.0" 499 0 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.100 Safari/537.36" "-"