Skip to content
Cyprien Devillez edited this page Mar 7, 2015 · 45 revisions

IPv4: 5.196.206.62
Virtual MAC: 02:00:00:14:05:2c
OS: Ubuntu 14.04

VM Template

Installed from VM-template

Nginx

Install nginx (as root):

$ apt-get install nginx
$ vi /etc/nginx/sites-available/web.conf
server {
    listen       80;
    server_name  redirtest.donut.me;
    rewrite ^(.*) https://test.donut.me$1 permanent;
}
server {
  listen       80;
  server_name  test.donut.me;
  location / {
    proxy_pass http://test.donut.me:3000;
  }
  gzip on;
  gzip_min_length  1100;
  gzip_buffers  16 32k;
  gzip_types    text/plain application/x-javascript text/xml text/css;
  gzip_comp_level 6;
  gzip_proxied any;
  gzip_vary on;
}
$ vi /etc/nginx/sites-available/ws.conf
upstream io_nodes {
  ip_hash;
  server ws.test.donut.me:3050;
  server ws.test.donut.me:3051;
}
server {
  listen 80;
  server_name ws.test.donut.me;
  location / {
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection "upgrade";
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header Host $host;
    proxy_http_version 1.1;
    proxy_pass http://io_nodes;
  }
  gzip on;
  gzip_min_length  1100;
  gzip_buffers  16 32k;
  gzip_types    text/plain application/x-javascript text/xml text/css;
  gzip_comp_level 6;
  gzip_proxied any;
  gzip_vary on;
}
$ cd /etc/nginx/sites-enabled
$ rm default
$ ln -s /etc/nginx/sites-available/web.conf web
$ ln -s /etc/nginx/sites-available/ws.conf ws

SSL certificate request

mkdir /etc/nginx/ssl
cd /etc/nginx/ssl
openssl req -nodes -newkey rsa:2048 -sha1 -keyout donut.key -out donut.csr
Country Name (2 letter code) [AU]:FR
State or Province Name (full name) [Some-State]:Paris
Locality Name (eg, city) []:Paris
Organization Name (eg, company) [Internet Widgits Pty Ltd]:DONUT SYSTEMS SAS
Organizational Unit Name (eg, section) []:DONUT SYSTEMS SAS
Common Name (e.g. server FQDN or YOUR name) []:*.donut.me
Email Address []:hello@donut.me

Please enter the following 'extra' attributes
to be sent with your certificate request
A challenge password []:
An optional company name []:

Clone this wiki locally