Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to collect access logs? #126

Closed
ck003 opened this issue Apr 23, 2019 · 9 comments
Closed

How to collect access logs? #126

ck003 opened this issue Apr 23, 2019 · 9 comments

Comments

@ck003
Copy link

ck003 commented Apr 23, 2019

Hello , Thanks for your sharing . How can I collect access logs because I want to know who have accessed my server , and I want to know their IP address, please help

@ck003
Copy link
Author

ck003 commented Apr 23, 2019

@jc21

@kolbii
Copy link
Contributor

kolbii commented Apr 23, 2019

Not sure, but I think you can mount a host directory to /var/log/nginx. For instance:
docker run -d
--name nginx-proxy-manager-app
-p 80:80
-p 81:81
-p 443:443
-v /path/to/config.json:/app/config/production.json
-v /path/to/logs:/var/log/ninx
-v /path/to/data:/data
-v /path/to/letsencrypt:/etc/letsencrypt
jc21/nginx-proxy-manager:latest-armhf

@jc21
Copy link
Member

jc21 commented Apr 23, 2019

The access logs for each host created by NPM is available in the data directory you should be mounting. eg data/logs/proxy_host-10.log

@ncm-lfc
Copy link

ncm-lfc commented Nov 7, 2019

Any idea where I can find these log files in Hassio addon?

@b2az
Copy link

b2az commented Jun 23, 2020

@ncm-lfc searching for the same. Have you found the logs?

@johnnny1337
Copy link

@ncm-lfc @b2az Did you find them?

@lordfiSh
Copy link

lordfiSh commented Mar 6, 2021

@jonrub @ncm-lfc @b2az you most likely don't need the info anymore, but logs are mapped to Supervisor Nginx Proxy Manager
Log Tab: (https://github.com/hassio-addons/addon-nginx-proxy-manager/blob/main/proxy-manager/rootfs/etc/cont-init.d/npm.sh)

@b2az
Copy link

b2az commented Oct 15, 2021

@lordfiSh yes thx sorted it out already :)

@graig123
Copy link

graig123 commented Mar 5, 2022

Any one looking to use ngxtop for access log monitoring and not having any luck.

I changes the conf file genarated by NPM for my host ( location: /data/nginx/proxy_host filename will be 1.conf | or similar)
Inside it there is a line:
access_log /data/logs/proxy-host-1_access.log proxy;
changed it to:
access_log /data/logs/proxy-host-1_access.log;

ngxtop can procces log after this change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants