Created
April 17, 2015 20:27
-
-
Save paulproteus/9466a40c4d40ec4b7f8d to your computer and use it in GitHub Desktop.
Sandstorm + nginx, just http (no https)
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
# This is an example nginx config used to serve your Sandstorm server without SSL/TLS. | |
# | |
# Definitions like these should go in the "http" block of your nginx config. | |
# Configuration for Sandstorm shell. | |
server { | |
listen 80; | |
server_name localhost; # no need to customize this line | |
location / { | |
proxy_pass http://127.0.0.1:6080; | |
# Forward the Host header, which is used to route requests for | |
# static content published from Sandstorm apps. | |
proxy_set_header Host $http_host; | |
# Forward WebSocket. | |
proxy_http_version 1.1; | |
proxy_set_header Upgrade $http_upgrade; | |
proxy_set_header Connection $connection_upgrade; | |
} | |
# Allow large spk uploads from the /install form and allow grains to receive large uploads. | |
client_max_body_size 256M; | |
} | |
# For WebSocket forwarding, we want to forward the `Connection` header. | |
# This "map" declaration helps with that. | |
map $http_upgrade $connection_upgrade { | |
default upgrade; | |
'' close; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Note that this means your data is accessible over HTTP not HTTPS! I look forward to easy HTTPS integrated into Sandstorm "soon".
To use this, run:
Optionally, change your Sandstorm to now only listen on localhost via
/opt/sandstorm/sandstorm.conf
.