allinurl / goaccess

GoAccess is a real-time web log analyzer and interactive viewer that runs in a terminal in *nix systems or through your browser.
https://goaccess.io
MIT License
17.88k stars 1.09k forks source link

docker nginx reverse proxy + goaccess container #1297

Open AndreaHasani opened 5 years ago

AndreaHasani commented 5 years ago

I can't seem to get this working.

Here's an example of my config

Nginx

listen              443 ssl http2;
location /ws/ {
    proxy_pass http://localhost:7890;
    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection "Upgrade";
}
goaccess.conf

port 7890
addr 0.0.0.0
ws-url wss://tld.com:443/ws/
Docket Compose

    nginx:
        restart: always
        image: nginx:stable-alpine
        links:
          - novelepubs:uwsgi
          - andreahasani:uwsgi1
          - tubex69:uwsgi2

        ports:
          - 80:80
          - 443:443

        volumes:
            - /etc/letsencrypt/:/etc/letsencrypt

            # Logs server
            - ./containers/logger/nginx:/var/log/nginx
            - ./containers/logger/goaccess/html:/srv/stats

        networks:
            - websiteNetwork

    logger:
      restart: always
      image: allinurl/goaccess
      ports:
        - 7890:7890

      depends_on:
        - "nginx"

      volumes:
        - ./containers/logger/goaccess/data:/srv/data/
        - ./containers/logger/goaccess/html:/srv/report/
        - ./containers/logger/nginx:/srv/logs/
        - /etc/letsencrypt/:/etc/letsencrypt
      networks:
          - websiteNetwork

networks:
    websiteNetwork:
        driver: "bridge"

Am I doing something wrong?

allinurl commented 5 years ago

Haven't had a chance to set the same environment in order to reproduce this, however, may be this will help?

Zidichy commented 4 years ago

Here you go, fully working goaccess subdomain.conf in RP :) https://github.com/Zidichy/Server/blob/master/proxy-confs/goaccess.conf

allinurl commented 4 years ago

@Zidichy Awesome, thanks for sharing this!

Zidichy commented 4 years ago

@allinurl Np :) Happy to help out. Actually, i have a question, can i ask it here or do you want me to create a new issue ?

allinurl commented 4 years ago

@Zidichy feel free to do it here on github.