Add public logs folder

This commit is contained in:
dpedu 2015-02-15 10:25:32 -08:00
parent 866456bc5c
commit 6b6ce258ed
3 changed files with 10 additions and 4 deletions

View File

@ -22,7 +22,7 @@ RUN echo "daemon off;" >> /etc/nginx/nginx.conf
COPY default /etc/nginx/sites-available/default
# Install pisg stuff for log generation
RUN su -c 'mkdir /home/znc/pisg /home/znc/pisg/cache /home/znc/pisg/output' znc
RUN su -c 'mkdir /home/znc/pisg /home/znc/pisg/cache /home/znc/pisg/output /home/znc/pisg/output/.pub' znc
COPY pisg.py /home/znc/pisg/
RUN chmod +x /home/znc/pisg/pisg.py

View File

@ -39,6 +39,8 @@ This container creates [pisg]-style channel statistics ([example]) for any ZNC u
The channel information is private, nginx is configured with HTTP basic authentication; the password is prompted for during setup.
Individual channel statistic files can be made public by symlinking each, for example, to /home/znc/pisg/output/.pub/mychannel.html, which is public at http://server-ip/pub/mychannel.html. Directory listing for /pub/ is disabled.
TODO
====

10
default
View File

@ -1,14 +1,18 @@
server {
listen 80 default_server;
listen [::]:80 default_server ipv6only=on;
root /home/znc/pisg/output;
root /home/znc/pisg/output;
index index.html index.htm;
server_name localhost;
auth_basic "Restricted";
auth_basic_user_file /etc/nginx/htpasswd;
location / {
autoindex on;
try_files $uri $uri/ =404;
auth_basic "Restricted";
auth_basic_user_file /etc/nginx/htpasswd;
}
location /pub/ {
autoindex off;
alias /home/znc/pisg/output/.pub/;
}
location /gfx/ {
alias /usr/share/pisg/gfx/;