Last active
April 7, 2017 19:01
-
-
Save centminmod/9001108 to your computer and use it in GitHub Desktop.
bittorrent sync CentminMod.com Nginx vhost for SSL + SPDY secure reverse proxy for bittorrent sync installation.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
################# | |
for 64bit OS only | |
pushd /svr-setup/ | |
mkdir bittorrentsync | |
wget http://download.getsyncapp.com/endpoint/btsync/os/linux-glibc23-x64/track/stable -O bittorrentsync/bittorrentsync.tar.gz | |
pushd bittorrentsync | |
tar xzfv bittorrentsync.tar.gz | |
cp btsync /usr/bin/ | |
chmod /usr/bin/btsync | |
/usr/bin/btsync | |
echo "GUI Console at http://$(hostname):8888" | |
################# | |
for 32bit OS only | |
pushd /svr-setup/ | |
mkdir bittorrentsync | |
wget http://download.getsyncapp.com/endpoint/btsync/os/linux-glibc23-i386/track/stable -O bittorrentsync/bittorrentsync.tar.gz | |
pushd bittorrentsync | |
tar xzfv bittorrentsync.tar.gz | |
cp btsync /usr/bin/ | |
chmod /usr/bin/btsync | |
/usr/bin/btsync | |
echo "GUI Console at http://$(hostname):8888" | |
################# | |
CentOS init.d startup script for manaing btsync https://gist.github.com/centminmod/8997353 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. the initial SSL setup as per http://centminmod.com/nginx_configure_https_ssl_spdy.html. | |
2. update yourdomain.com DNS A record to point btsync.yourdomain.com to your server IP address | |
3. setup Nginx vhost as follows. | |
4. restart Nginx server | |
5. visit https://btsync.yourdomain.com:8888 | |
server { | |
listen 80; | |
server_name btsync.yourdomain.com; | |
return 301 https://$server_name$request_uri; | |
} | |
server { | |
listen 443 ssl spdy; | |
server_name btsync.yourdomain.com; | |
ssl_certificate /usr/local/nginx/conf/ssl/yourdomaincom/ssl-unified.crt; | |
ssl_certificate_key /usr/local/nginx/conf/ssl/yourdomaincom/ssl.key; | |
ssl_protocols SSLv3 TLSv1 TLSv1.1 TLSv1.2; | |
ssl_session_cache shared:SSL:10m; | |
ssl_session_timeout 10m; | |
ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-RC4-SHA:ECDHE-RSA-AES128-SHA:AES128-GCM-SHA256:RC4:HIGH:!MD5:!aNULL:!kEDH:!EDH:!CAMELLIA; | |
ssl_prefer_server_ciphers on; | |
add_header Alternate-Protocol 443:npn-spdy/3; | |
add_header Strict-Transport-Security "max-age=31536000; includeSubdomains;"; | |
#add_header X-Content-Type-Options "nosniff"; | |
#add_header X-Frame-Options DENY; | |
# nginx 1.5.9+ or higher | |
# http://nginx.org/en/docs/http/ngx_http_spdy_module.html#spdy_headers_comp | |
# http://nginx.org/en/docs/http/ngx_http_ssl_module.html#ssl_buffer_size | |
# spdy_headers_comp 0; | |
# ssl_buffer_size 4k; | |
# enable ocsp stapling | |
resolver 8.8.8.8; | |
ssl_stapling on; | |
ssl_stapling_verify on; | |
ssl_trusted_certificate /usr/local/nginx/conf/ssl/yourdomaincom/ssl-trusted.crt; | |
# ssi on; | |
access_log /home/nginx/domains/yourdomain.com/log/access.log combined buffer=32k; | |
error_log /home/nginx/domains/yourdomain.com/log/error.log; | |
root /home/nginx/domains/yourdomain.com/public; | |
location / { | |
proxy_pass http://127.0.0.1:8888; | |
} | |
# include /usr/local/nginx/conf/staticfiles.conf; | |
# include /usr/local/nginx/conf/php.conf; | |
# include /usr/local/nginx/conf/drop.conf; | |
# include /usr/local/nginx/conf/errorpage.conf; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment