From 84a077763b6d9663a5d82835a484e1b55a199ee5 Mon Sep 17 00:00:00 2001 From: Christian Heller Date: Tue, 12 Apr 2016 01:29:17 +0200 Subject: [PATCH] Improve nginx and IRC logs integration. --- jessie_postinstall.sh | 5 +++-- systemfiles/nginx.conf | 9 +++++---- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/jessie_postinstall.sh b/jessie_postinstall.sh index 000f8e4..821b4b3 100755 --- a/jessie_postinstall.sh +++ b/jessie_postinstall.sh @@ -222,8 +222,7 @@ if [ "$1" = "server" ]; then # Set up htwtxt environment. apt-get -y install screen nginx apt-get -y -t jessie-backports install golang - su - plom -c 'git clone '\ -'https://github.com/plomlompom/htwtxt $GOPATH/src/htwtxt' + su - plom -c 'git clone https://github.com/plomlompom/htwtxt $GOPATH/src/htwtxt' su - plom -c 'go get htwtxt' path=`su - plom -c 'echo $GOPATH/bin/htwtxt'` #setcap 'cap_net_bind_service=+ep' $path @@ -240,6 +239,8 @@ if [ "$1" = "server" ]; then cp config/systemfiles/plomlombot.service \ /etc/systemd/system/plomlombot.service systemctl enable /etc/systemd/system/plomlombot.service + mkdir /var/www/irclogs_zrolaps/ + touch /var/www/password_irclogs_zrolaps fi elif [ "$1" = "thinkpad" ]; then diff --git a/systemfiles/nginx.conf b/systemfiles/nginx.conf index 5b9b028..98626de 100644 --- a/systemfiles/nginx.conf +++ b/systemfiles/nginx.conf @@ -23,18 +23,19 @@ http { access_log /var/log/nginx/access.log; error_log /var/log/nginx/error.log; - # file server + # IRC logs server server { location / { + auth_basic "IRC logs"; + auth_basic_user_file /var/www/password_irclogs_zrolaps; autoindex on; - root /data/www; + root /var/www/irclogs_zrolaps/; } } # htwtxt server { - listen 8080; - #server_name htwtxt.plomlompom.com; + server_name htwtxt.plomlompom.com; location / { proxy_pass http://127.0.0.1:8000; } -- 2.30.2