rwtxt
How rwtxt is configured on this server
NGINX
location ~ ^/(n/|login|ws)(.*) {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_redirect off;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
proxy_pass http://localhost:8152;
}
NOTE:
- I created a domain called
n
that I’m exposing as a “public domain” in rwtxt’s parlance. - I’m not exposing the
/public
endpoint because I do not want spam.
Static files
I copied the $src/static
directory to the “root” of my
web server.
Systemd
On a ubuntu server, create a service file as
/etc/systemd/system/rwtxt.service
:
[Unit]
Description=rwtxt service
After=syslog.target network.target
[Service]
Type=simple
WorkingDirectory=/srv/www.btbytes.com/rwtxt
ExecStart=/srv/www.btbytes.com/rwtxt/rwtxt
User=www-data
Group=www-data
[Install]
WantedBy=multi-user.target
and then –
chmod 644 /etc/systemd/system/rwtxt.service
systemctl enable rwtxt.service
(to ensure that the service starts on bootup).systemctl daemon-reload
service rwtxt reload