Skip to content

Instantly share code, notes, and snippets.

@janlelis
Created December 21, 2013 19:57
Show Gist options
  • Save janlelis/8074170 to your computer and use it in GitHub Desktop.
Save janlelis/8074170 to your computer and use it in GitHub Desktop.
An example nginx config to setup the palava-portal and a palava-machine.
upstream palava_machine {
server 127.0.0.1:4240;
}
server {
listen 443 ssl;
server_name example.com; # TODO
ssl on;
ssl_certificate /path/to/your/ssl/cert.crt; # TODO
ssl_certificate_key /path/to/your/ssl/cert.key; # TODO
root /home/palava/palava-portal/build;
access_log /home/palava/nginx.access.log;
error_log /home/palava/nginx.error.log;
location /info/machine {
proxy_pass http://palava_machine;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_read_timeout 86400;
}
location / {
if (-f $request_filename) {
break;
}
rewrite ^/.+$ / last;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment