Created
December 21, 2013 19:57
-
-
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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