Created
March 19, 2015 13:33
-
-
Save lloydwatkin/0474f87c30854cf54944 to your computer and use it in GitHub Desktop.
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
server { | |
listen 80; | |
server_name ~^buddycloud\.(?<domain>.+)$; | |
rewrite ^ https://http.#BC_DOMAIN#?h=$domain permanent; | |
} | |
server { | |
listen 80; | |
server_name hosting.#BC_DOMAIN#; | |
rewrite ^ https://$server_name$request_uri? permanent; | |
} | |
server { | |
listen 443 ssl; | |
server_name hosting.#BC_DOMAIN#; | |
ssl_certificate /etc/certs/buddycloud.pem; | |
ssl_certificate_key /etc/certs/buddycloud.pem; | |
ssl_protocols SSLv3 TLSv1 TLSv1.1 TLSv1.2; | |
ssl_ciphers HIGH:!aNULL:!MD5; | |
location / { | |
proxy_pass http://#BC_ENV_HOST#:3000/; | |
} | |
} | |
server { | |
listen 80; | |
server_name *.#BC_DOMAIN#; | |
rewrite ^ https://$server_name$request_uri? permanent; | |
} | |
map $host $forwarded_host { | |
~^buddycloud\.(?<domain>.+)$ $domain; | |
default $host; | |
} | |
server { | |
listen 443 ssl; | |
server_name *.#BC_DOMAIN#; | |
ssl_certificate /etc/certs/buddycloud.pem; | |
ssl_certificate_key /etc/certs/buddycloud.pem; | |
ssl_protocols SSLv3 TLSv1 TLSv1.1 TLSv1.2; | |
ssl_ciphers HIGH:!aNULL:!MD5; | |
root /usr/share/buddycloud-webclient/; | |
index index.html; | |
location /api/ { | |
proxy_pass http://#BC_ENV_HOST#:9123/; | |
proxy_set_header X-Forwarded-Host $forwarded_host; | |
proxy_set_header X-Forwarded-Server $host; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
} | |
location /primus/1/websocket { | |
proxy_pass http://#BC_ENV_HOST#:9123/primus/1/websocket; | |
proxy_http_version 1.1; | |
proxy_set_header Upgrade $http_upgrade; | |
proxy_set_header Connection "upgrade"; | |
} | |
location /ws-xmpp { | |
proxy_pass http://#BC_ENV_HOST#:5290/; | |
proxy_http_version 1.1; | |
proxy_set_header Upgrade $http_upgrade; | |
proxy_set_header Connection "upgrade"; | |
} | |
location /primus/ { | |
proxy_pass http://#BC_ENV_HOST#:9123/primus/; | |
} | |
location /scripts/primus { | |
proxy_pass http://#BC_ENV_HOST#:9123/scripts/primus; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment