- Setting up CrashPlan server to use Let's Encrypt SSL behind an nginx reverse proxy
- Setup nginx according to the nginx.conf below
- Follow the standard Let's Encrypt certbot setup
- Setup CrashPlan servers "Website protocol, host and port" setting to be https://cp.domain.com instead of defaults !(https://support.code42.com/Administrator/5/Administration_Console_Reference/Server_Reference)[for more details click here]
- Note this needs to be set on ALL publicly facing CrashPlan servers
Last active
April 12, 2017 19:38
-
-
Save mcrosson/9a2e460c2523408a3cb434f5ccfb0bd3 to your computer and use it in GitHub Desktop.
nginx reverse proxy config for CrashPlan Enterprise
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
user www-data; | |
worker_processes 4; | |
error_log /var/log/nginx/error.log; | |
events { | |
worker_connections 1024; | |
} | |
http { | |
include mime.types; | |
default_type application/octet-stream; | |
keepalive_timeout 65; | |
ssl_protocols TLSv1 TLSv1.1 TLSv1.2; | |
ssl_prefer_server_ciphers on; | |
ssl_ciphers "EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH"; | |
ssl_ecdh_curve secp384r1; # Requires nginx >= 1.1.0 | |
ssl_session_cache shared:SSL:10m; | |
ssl_session_tickets off; # Requires nginx >= 1.5.9 | |
ssl_stapling on; # Requires nginx >= 1.3.7 | |
ssl_stapling_verify on; # Requires nginx => 1.3.7 | |
resolver $DNS-IP-1 $DNS-IP-2 valid=300s; | |
resolver_timeout 5s; | |
add_header Strict-Transport-Security "max-age=63072000; includeSubDomains; preload"; | |
add_header X-Frame-Options DENY; | |
add_header X-Content-Type-Options nosniff; | |
server { | |
listen 80; | |
listen [::]:80; | |
server_name cp.domain.com domain.com; | |
root /srv/http; | |
return 301 https://$host$request_uri; | |
} | |
server { | |
listen 443 ssl; | |
listen [::]:443 default_server ssl; | |
server_name cp.domain.com domain.com; | |
ssl_certificate /etc/letsencrypt/live/domain.com/fullchain.pem; | |
ssl_certificate_key /etc/letsencrypt/live/domain.com/privkey.pem; | |
client_max_body_size 4G; | |
location ~ /favico.*$ { | |
root /srv/http; | |
allow all; | |
log_not_found off; | |
} | |
location /.well-known { | |
root /srv/http; | |
allow all; | |
} | |
location / { | |
proxy_read_timeout 600; | |
proxy_pass https://[::1]:4285; | |
proxy_set_header Host $host; | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
proxy_set_header X-Forwarded-Proto $scheme; | |
# IMPORTANT -- This turns ON WebSockets in 1.4+ -- CP uses WebSockets for a lot of requests | |
proxy_http_version 1.1; | |
proxy_set_header Upgrade $http_upgrade; | |
proxy_set_header Connection "upgrade"; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment