Skip to content

Instantly share code, notes, and snippets.

@the-solipsist
Last active February 2, 2016 20:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save the-solipsist/896d47938fc9fbd7538f to your computer and use it in GitHub Desktop.
Save the-solipsist/896d47938fc9fbd7538f to your computer and use it in GitHub Desktop.
Kaiwa
server {
listen 80;
server_name chat.cis-india.org;
return 301 https://$server_name$request_uri;
}
server {
listen 8020;
listen 443 ssl;
server_name chat.cis-india.org;
error_log /var/log/nginx/HOST_error.log;
access_log /var/log/nginx/HOST_access.log;
ssl_certificate /etc/nginx/tls/star_cis-india_org.pem;
ssl_certificate_key /etc/nginx/tls/star_cis-india_org_decrypted.key;
ssl_session_timeout 1d;
ssl_session_cache shared:SSL:50m;
# Diffie-Hellman parameter for DHE ciphersuites, recommended 2048 bits
ssl_dhparam /etc/nginx/tls/dhparam.pem;
ssl_protocols TLSv1.1 TLSv1.2;
ssl_ciphers 'ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:kEDH+AESGCM:ECDHE-RSA-AES12$
ssl_prefer_server_ciphers on;
location / {
proxy_pass http://127.0.0.1:8000;
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}
modules_enabled = {
...
"bosh"; -- Enable BOSH clients, aka "Jabber over HTTP"
"websocket";
...
}
cross_domain_bosh = "*";
cross_domain_websocket = true;
consider_websocket_secure = true;
VirtualHost "cis-india.org"
-- enabled = false -- Remove this line to enable this host
http_host = "chat.cis-india.org"
Component "chat.cis-india.org" "muc"
...
http_paths = {
bosh = "/http-bind"; -- Serve BOSH at /http-bind
websocket = "/websocket";
files = "/"; -- Serve files from the base URL
{
"isDev": true,
"http": {
"baseUrl": "http://127.0.0.1:8000",
"port": 8000,
"key": "/path/to/star_cis-india_org_decrypted.key",
"cert": "/path/to/star_cis-india_org.pem"
},
"session": {
"secret": "not-my-actual-secret"
},
"server": {
"name": "CIS",
"domain": "cis-india.org",
"wss": "wss://chat.cis-india.org/xmpp-websocket",
"muc": "chat.cis-india.org",
"startup": "groupchat/lawn%40chat.cis-india.org",
"admin": "pranesh@cis-india.org"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment