Translations of this page?:

twister

Peer-to-peer microblogging

User Tools

Site Tools


using:howto:twister_on_your_self-host_server

This is an old revision of the document!


A PCRE internal error occured. This might be caused by a faulty plugin

<markdown> # Twister on self-host server This how-to is write for unix like operating system. ## Require For all : * A computer can run every time * A http proxy If you wan't access with all world : * Public ip * Domain name (optional) ## Install You can follow install methode of your operating systeme. Recommend : * Use a specific user for twister ``` useradd -m -U -s /bin/false twister ``` ## Running You can run twister as you like, but this sh script is pretty fun : ```sh #!/bin/sh twisterd_user="twister" twisterd_path="/home/twister/twister-core.git/twisterd" twisterd_arg="-rpcuser=user -rpcpassword=pwd -rpcallowip=127.0.0.1" if [ 1 -ne $# ] then echo $0 "argument is (start|stop|restart|help)" elif [ "$1" = "start" ] then su -s /bin/sh $twisterd_user -lc "${twisterd_path} ${twisterd_arg} -daemon" elif [ "$1" = "stop" ] then su -s /bin/sh $twisted_user -lc "${twisterd_path} ${twisterd_arg} stop" elif [ "$1" = "restart" ] then su -s /bin/sh $twisterd_user -lc "${twisterd_path} ${twisterd_arg} stop" sleep 5 su -s /bin/sh $twisterd_user -lc "${twisterd_path} ${twisterd_arg} -daemon" else echo $0 "argument is (start|stop|restart|help)" fi ``` ## Nginx proxy Nginx vhost setting, set allow / deny or auth_* for specify who can connect to your twister instance : TODO : Add http authetification settings ``` upstream twister { server 127.0.0.1:28332; # Default twister port } server { listen 80; # listen 443; # Require ssl certificate server_name twister.exemple.com; # your host name server_tokens off; # don't show the version number, a security best practice # allow ip.ad.re.ss/mask # For allow ip can access of twister instance # deny ip.ad.re.ss/mask # For deny ip can access of twister instance # auth_basic "Restricted"; # Change this if you want string if you wan't # auth_basic_user_file htpasswd; # Your htpasswd filename use apache2 tools for generate this file # individual nginx logs for this vhost access_log /var/log/nginx/access.log.d/twister.log; error_log /var/log/nginx/error.log.d/twister.log; # Redirection location / { proxy_redirect off; proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header Host $http_host; proxy_set_header X-Real-IP $remote_addr; proxy_pass http://twister; } } ``` Now you can go to twister.exemple.com/index.html or twister.exemple.com/home.html, twister.exemple.com isn't good way you or other can't do any think. ## Apache proxy </markdown>

using/howto/twister_on_your_self-host_server.1392150882.txt.gz · Last modified: 2014/02/11 21:34 by natir