From: Christian Heller Date: Mon, 11 Apr 2016 23:29:17 +0000 (+0200) Subject: Improve nginx and IRC logs integration. X-Git-Url: https://plomlompom.com/repos/te"st.html?a=commitdiff_plain;h=84a077763b6d9663a5d82835a484e1b55a199ee5;p=config Improve nginx and IRC logs integration. --- 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; }