====== Differences ====== This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | Last revision Both sides next revision | ||
using:howto:twister_on_your_self-host_server [2014/03/20 01:13] samir |
using:howto:twister_on_your_self-host_server [2014/03/20 01:31] samir |
||
---|---|---|---|
Line 124: | Line 124: | ||
# 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 138: | 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 |