From c21ff2779e5e5318369b476890febfe3ac69650c Mon Sep 17 00:00:00 2001 From: "Theunis J. Botha" Date: Mon, 7 Nov 2016 12:43:38 +0100 Subject: [PATCH] config updates - tools --- config.js | 23 +++++++++++++++++++++-- secure.js | 13 +++++++++++++ tools.conf | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 80 insertions(+), 2 deletions(-) create mode 100644 secure.js create mode 100644 tools.conf diff --git a/config.js b/config.js index 3e84b70..04dc03b 100644 --- a/config.js +++ b/config.js @@ -19,7 +19,7 @@ var config = { account: 'root', subAccount: 'root' }, - uploadPath : '/uploads' + uploadPath: '/uploads' }, api16: { url: "http://api.gamewheel.local", @@ -54,8 +54,27 @@ var config = { }, sessionKey: 'iJswK29klj20Jos02mJK8ud9239j23' }, + tools: { + url: "http://tools.gamewheel.local", + port: 3105, + debugPort: 3205, + mysqlUserExport: { + host: "gwdb.cpuanrat3vd1.eu-central-1.rds.amazonaws.com", + port: 3306, + user: "root", + password: "5t0bURlq" + }, + mongoUserImport: { + host: "127.0.0.1", + port: 27017, + options: { + user: '', + pass: '' + } + } + }, environment: { - mode : 'development' + mode: 'development' } }; diff --git a/secure.js b/secure.js new file mode 100644 index 0000000..2d707ed --- /dev/null +++ b/secure.js @@ -0,0 +1,13 @@ +var secure = { + vr_pong : { + }, + vr_racer : { + }, + editor : { + } +}; + +if (typeof module !== 'undefined') { + module.exports = secure; +} + diff --git a/tools.conf b/tools.conf new file mode 100644 index 0000000..e237f11 --- /dev/null +++ b/tools.conf @@ -0,0 +1,46 @@ +server { + listen 80; + listen 443 ssl; + + server_name tools.gamewheel.local tools-debug.gamewheel.local; + + root /srv/gamewheel.local/tools; + index index.html; + + access_log /var/log/nginx/tools.gamewheel.local.access.log; + error_log /var/log/nginx/tools.gamewheel.local.error.log; + + ssl_certificate /etc/ssl/certs/ssl-cert-snakeoil.pem; + ssl_certificate_key /etc/ssl/private/ssl-cert-snakeoil.key; + ssl_session_timeout 5m; + ssl_protocols SSLv3 TLSv1 TLSv1.1 TLSv1.2; + ssl_ciphers "HIGH:!aNULL:!MD5 or HIGH:!aNULL:!MD5:!3DES"; + ssl_prefer_server_ciphers on; + +# location ~ \.php$ { +# fastcgi_pass 127.0.0.1:9001; +# fastcgi_index index.php; +# fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; +# fastcgi_param SCRIPT_URL $request_uri; +# fastcgi_param SERVER_NAME $http_host; +# include fastcgi_params; +# } + + location / { + add_header Access-Control-Allow-Origin $http_origin; + autoindex on; + try_files $uri $uri/ @node; + } + + location @node { + proxy_pass_request_headers on; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-NginX-Proxy true; + # Replace here with proper host/port + proxy_pass http://127.0.0.1:3105; + proxy_ssl_session_reuse off; + proxy_set_header Host $http_host; + proxy_redirect off; + } +}