home · contact · privacy
Improve nginx and IRC logs integration.
authorChristian Heller <c.heller@plomlompom.de>
Mon, 11 Apr 2016 23:29:17 +0000 (01:29 +0200)
committerChristian Heller <c.heller@plomlompom.de>
Mon, 11 Apr 2016 23:29:17 +0000 (01:29 +0200)
jessie_postinstall.sh
systemfiles/nginx.conf

index 000f8e41b2a1ef37402ccad3d095b6bdb1d47303..821b4b3f76bf7057f2194f978f24e92151030821 100755 (executable)
@@ -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
index 5b9b028cd4085fe292f95fd0899e0556307ab0e4..98626de2ed962d5da8fe8080ede3193a3c25388b 100644 (file)
@@ -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;
                 }