twister

Peer-to-peer microblogging

User Tools

Site Tools


using:howto:twister_on_your_self-host_server

====== Differences ====== This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Last revision Both sides next revision
using:howto:twister_on_your_self-host_server [2014/03/20 01:10]
samir
using:howto:twister_on_your_self-host_server [2014/03/20 01:31]
samir
Line 106: Line 106:
  
 ``` ```
 +# The redirection from http to https
 +<​VirtualHost *:80>
 +        DocumentRoot /var/www/
 +        ServerName twister.example.com
 +        <​IfModule mod_rewrite.c>​
 +                RewriteEngine on
 +                RewriteRule ^(.*)$ https://​%{HTTP_HOST}$1
 +        </​IfModule>​
 +
 +        CustomLog /​var/​log/​apache2/​twister-access.log combined
 +        ErrorLog /​var/​log/​apache2/​twister-error.log
 +</​VirtualHost>​
 +
 +# The real part of the configuration
 <​VirtualHost *:443> <​VirtualHost *:443>
         ServerAdmin webmaster@localhost         ServerAdmin webmaster@localhost
         # Edit with your dns         # Edit with your dns
         ServerName twister.example.com         ServerName twister.example.com
-        # Does not matter since we redirect all traffic ​to twister +        ​ 
-        # we can improve the conf by serving ​static ​content +        ​Set DocumentRoot ​to twister ​html directory to let apache 
-        DocumentRoot /var/www/+        # serve static ​contents 
 +        DocumentRoot /path/to/​twister-html/
         ​         ​
         # Usage of a custom log path         # Usage of a custom log path
Line 124: Line 139:
         SSLCertificateChainFile /​etc/​apache2/​ssl/​chain.crt         SSLCertificateChainFile /​etc/​apache2/​ssl/​chain.crt
  
 +        # we use url rewriting for proxying
 +        RewriteEngine on
 +        ​
         # redirect / to /index.html if the request is         # redirect / to /index.html if the request is
         # a GET request. Call to the API seems to be all POST         # a GET request. Call to the API seems to be all POST
-        RewriteEngine on 
         RewriteCond %{THE_REQUEST} GET         RewriteCond %{THE_REQUEST} GET
-        RewriteRule ^/$ /index.html [R,L]+        RewriteRule ^/$ /index.html [L]
         ​         ​
-        # setting up the reverse ​proxy +        # proxy POST request to / to twister ​ 
-        ​ProxyRequests Off +        ​RewriteCond %{THE_REQUEST} POST 
-        ProxyVia Full +        ​RewriteRule ^/http://​127.0.0.1:​28332/ ​[P,QSA]
-        ProxyTimeout 10 +
-        ProxyPass / http://​127.0.0.1:​28332/​ +
-        ​ProxyPassReverse ​/ http://​127.0.0.1:​28332/​+
         ​         ​
         # Authentication         # Authentication
using/howto/twister_on_your_self-host_server.txt · Last modified: 2014/05/20 13:11 by erkan_yilmaz