elif [ "$2" = "public" ]; then
- # Set up twtxt environment.
- apt-get -y install screen
+ # 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 'go get htwtxt'
path=`su - plom -c 'echo $GOPATH/bin/htwtxt'`
- setcap 'cap_net_bind_service=+ep' $path
+ #setcap 'cap_net_bind_service=+ep' $path
su - plom -c 'mkdir -p ~/htwtxt'
cp config/systemfiles/htwtxt_restart_reminder.service \
/etc/systemd/system/htwtxt_restart_reminder.service
systemctl enable /etc/systemd/system/htwtxt_restart_reminder.service
+ cp config/systemfiles/nginx.conf /etc/nginx/nginx.conf
# Set up plomlombot.
apt-get -y install python3 python3-venv python3-pip
--- /dev/null
+# system integration
+user www-data;
+pid /run/nginx.pid;
+
+# is expected even if empty
+events {
+}
+
+http {
+ # define content-type headers
+ types {
+ text/html html htm shtml;
+ text/css css;
+ text/xml xml;
+ text/plain txt;
+ text/plain sh;
+ application/xhtml+xml xhtml;
+ }
+ default_type application/octet_stream;
+ charset utf-8;
+
+ # logging
+ access_log /var/log/nginx/access.log;
+ error_log /var/log/nginx/error.log;
+
+ # file server
+ server {
+ location / {
+ autoindex on;
+ root /data/www;
+ }
+ }
+
+ # htwtxt
+ server {
+ listen 8080;
+ #server_name htwtxt.plomlompom.com;
+ location / {
+ proxy_pass http://127.0.0.1:8000;
+ }
+ }
+}