Skip to content

Instantly share code, notes, and snippets.

@hrchu
Created May 2, 2017 11:02
Show Gist options
  • Save hrchu/537f624ce0b532b577bf228435232964 to your computer and use it in GitHub Desktop.
Save hrchu/537f624ce0b532b577bf228435232964 to your computer and use it in GitHub Desktop.
SSL offload with Nginx and ubuntu 16.04 for radosgw
  • $ openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/ssl/private/nginx-selfsigned.key -out /etc/ssl/certs/nginx-selfsigned.crt
  • $ apt install nginx
  • $ vim /etc/nginx/sites-available/default
upstream backends {
    server 10.144.225.175:8080;
}

server {
    listen      443 ssl;
    server_name _;
    ssl_certificate /etc/ssl/certs/nginx-selfsigned.crt;
    ssl_certificate_key /etc/ssl/private/nginx-selfsigned.key;
    location / {
        proxy_buffering off;
        proxy_request_buffering off;
        client_max_body_size 16400M;
        proxy_pass http://backends;
    }
}
  • $ nginx -t
  • $ /etc/init.d/nginx restart
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment