Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

file 109 lines (109 sloc) 3.211 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109
user root;
worker_processes 4;
error_log /var/log/nginx/error.log;
pid /var/run/nginx.pid;
events {
    worker_connections 4096;
}
http {
 more_set_headers 'Server: Diaspora*';
 include mime.types;
 default_type application/octet-stream;
 access_log /var/log/nginx/access.log;
 sendfile on;
 keepalive_timeout 65 65;
 server_tokens off;
 gzip on;
 gzip_comp_level 2;
 gzip_vary on;
 gzip_proxied any;
 gzip_buffers 16 8k;
 gzip_types text/plain text/css application/x-javascript text/xml application/xml application/xml+rss text/javascript;
 gzip_disable "MSIE [1-6]\.(?!.*SV1)";
  upstream thin_cluster {
    server 127.0.0.1:3000;
    server 127.0.0.1:3001;
    server 127.0.0.1:3002;
    server 127.0.0.1:3003;
    fair;
  }
  server {
   listen [::]:80;
   server_name diasp.org www.diasp.org;
   rewrite ^(.*) https://diasp.org$1 permanent;
  }
  server {
   listen [::]:81;
   server_name diasp.org;
   ssl on;
   ssl_certificate /root/certs/wild/server.pem;
   ssl_certificate_key /root/certs/wild/server.key;
   ssl_session_cache shared:SSL:10m;
   ssl_session_timeout 5m;
   ssl_protocols TLSv1;
   ssl_ciphers ECDHE-RSA-AES256-SHA384:AES256-SHA256:RC4:HIGH:!MD5:!aNULL:!EDH:!AESGCM;
   ssl_prefer_server_ciphers on;
   ssl_ecdh_curve secp521r1;
   add_header Strict-Transport-Security max-age=500;
    location / {
        root /var/www/stats;
        auth_basic "Restricted";
        auth_basic_user_file htpasswd;
        index index.html index.htm;
    }
  }
  server {
   listen [::]:443;
   server_name diasp.org www.diasp.org gnu.diasp.org;
   root /home/dmm/diaspora/public;
   ssl on;
   ssl_certificate /root/certs/wild/server.pem;
   ssl_certificate_key /root/certs/wild/server.key;
   ssl_session_cache shared:SSL:10m;
   ssl_session_timeout 5m;
   ssl_protocols TLSv1;
   ssl_ciphers ECDHE-RSA-AES256-SHA384:AES256-SHA256:RC4:HIGH:!MD5:!aNULL:!EDH:!AESGCM;
   ssl_prefer_server_ciphers on;
   add_header Strict-Transport-Security max-age=500;
   ssl_ecdh_curve secp521r1;
   location /uploads/images {
    expires 5d;
    add_header Cache-Control public;
   }
   location /assets {
    expires 5d;
    add_header Cache-Control public;
   }
   location / {
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header Host $http_host;
    proxy_set_header X-Forwarded-Proto https;
    proxy_redirect off;
    client_max_body_size 4M;
    client_body_buffer_size 128K;
    if (-f $request_filename/index.html) {
      rewrite (.*) $1/index.html break;
    }
    if (-f $request_filename.html) {
     rewrite (.*) $1.html break;
    }
    if (!-f $request_filename) {
     proxy_pass http://thin_cluster;
     break;
    }
   }
   error_page 500 503 504 /500.html;
   location = /500.html {
    root /home/dmm/diaspora/public;
   }
   error_page 404 /404.html;
   location = /404.html {
    root /home/dmm/diaspora/public;
   }
   error_page 502 /down.html;
   location = /down.html {
    root /home/dmm/diaspora/public;
   }
 }
}
Something went wrong with that request. Please try again.