{"id":6018,"date":"2016-09-23T20:01:00","date_gmt":"2016-09-23T20:01:00","guid":{"rendered":"http:\/\/chilloutbude.eu\/?page_id=6018"},"modified":"2016-12-05T21:39:52","modified_gmt":"2016-12-05T21:39:52","slug":"rust-io-proxy-setup-guide","status":"publish","type":"page","link":"https:\/\/chilloutbude.eu\/index.php\/rust-io-proxy-setup-guide\/","title":{"rendered":"RUST IO Proxy setup guide"},"content":{"rendered":"<p>On this page i show you how to setup an proxy for your Rust:io Live Map.<br \/>\nBecause the reverse proxy\/webserver &#8220;nginx&#8221; has an awesome performance we will use this for rust.<br \/>\nThe installation of this is only possible if you run your rust server on a dedicated server, vps, local (afaik).<br \/>\nIf you have any questions, need more help or what ever im lunatik_cb in the rustservers slack community, DM me there.<\/p>\n<p>All credits go to dcode, the creator of the awesome extension Rust:io.<br \/>\n<!-- Project Wonderful Ad Box Loader --><script type=\"text\/javascript\">\n   (function(){function pw_load(){\n      if(arguments.callee.z)return;else arguments.callee.z=true;\n      var d=document;var s=d.createElement('script');\n      var x=d.getElementsByTagName('script')[0];\n      s.type='text\/javascript';s.async=true;\n      s.src='\/\/www.projectwonderful.com\/pwa.js';\n      x.parentNode.insertBefore(s,x);}\n   if (window.attachEvent){\n    window.attachEvent('DOMContentLoaded',pw_load);\n    window.attachEvent('onload',pw_load);}\n   else{\n    window.addEventListener('DOMContentLoaded',pw_load,false);\n    window.addEventListener('load',pw_load,false);}})();\n<\/script><br \/>\n<!-- End Project Wonderful Ad Box Loader --><br \/>\n<!-- Project Wonderful Ad Box Code --><\/p>\n<div style=\"text-align:center;\">\n<div style=\"display:inline-block;\" id=\"pw_adbox_79483_5_0\"><\/div>\n<\/div>\n<p><script type=\"text\/javascript\"><\/script><br \/>\n<noscript><\/p>\n<div style=\"text-align:center;\">\n<div style=\"display:inline-block;\">\n<map name=\"admap79483\" id=\"admap79483\">\n<area href=\"http:\/\/www.projectwonderful.com\/out_nojs.php?r=0&#038;c=0&#038;id=79483&#038;type=5\" shape=\"rect\" coords=\"0,0,728,90\" title=\"\" alt=\"\" target=\"_blank\" \/><\/map>\n<table cellpadding=\"0\" cellspacing=\"0\" style=\"width:728px;border-style:none;background-color:#ffffff;\">\n<tr>\n<td><img decoding=\"async\" src=\"http:\/\/www.projectwonderful.com\/nojs.php?id=79483&#038;type=5\" style=\"width:728px;height:90px;border-style:none;\" usemap=\"#admap79483\" alt=\"\" \/><\/td>\n<\/tr>\n<tr>\n<td style=\"background-color:#ffffff;\" colspan=\"1\"><center><a style=\"font-size:10px;color:#0000ff;text-decoration:none;line-height:1.2;font-weight:bold;font-family:Tahoma, verdana,arial,helvetica,sans-serif;text-transform: none;letter-spacing:normal;text-shadow:none;white-space:normal;word-spacing:normal;\" href=\"http:\/\/www.projectwonderful.com\/advertisehere.php?id=79483&#038;type=5\" target=\"_blank\">Ads by Project Wonderful!  Your ad here, right now: $0.02<\/a><\/center><\/td>\n<\/tr>\n<\/table>\n<\/div>\n<\/div>\n<p><\/noscript><br \/>\n<!-- End Project Wonderful Ad Box Code --><br \/>\n<strong>Step 1 &#8211; Installing Nginx on Windows<\/strong><br \/>\n1.1.) Download the most recent nginx for windows, you can find it here: http:\/\/nginx.org\/en\/download.html<br \/>\n1.2.) Extract the downloaded archive to a simple path, lets just take &#8220;C:\\nginx&#8221;, check the image below:<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"\" src=\"http:\/\/puu.sh\/rlsoy\/92f33de626.png\" alt=\"\" width=\"653\" height=\"190\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>1.3.) Navigate to the path you extracted nginx, in my case &#8220;C:\\nginx&#8221;, then open the &#8220;conf&#8221; folder after that open the file &#8220;nginx.conf&#8221; with an text editor.<br \/>\nReplace the whole content of that file with the text in blue, the line which is &#8220;listen 123.123.123.123:28015;&#8221; needs to be changed to match YOUR server IP and Port. ONLY change the IP:PORT, DO NOT change or delete the part &#8220;listen&#8221; and the &#8220;;&#8221; after the port.<br \/>\n<span style=\"color: #0000ff;\">worker_processes 1;<\/span><\/p>\n<p><span style=\"color: #0000ff;\">events {<\/span><br \/>\n<span style=\"color: #0000ff;\">\u00a0\u00a0\u00a0 worker_connections 1024;<\/span><br \/>\n<span style=\"color: #0000ff;\">}<\/span><\/p>\n<p><span style=\"color: #0000ff;\">http {<\/span><br \/>\n<span style=\"color: #0000ff;\">\u00a0\u00a0\u00a0 map $http_upgrade $connection_upgrade {<\/span><br \/>\n<span style=\"color: #0000ff;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 default upgrade;<\/span><br \/>\n<span style=\"color: #0000ff;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 &#8221;\u00a0\u00a0\u00a0\u00a0\u00a0 close;<\/span><br \/>\n<span style=\"color: #0000ff;\">\u00a0\u00a0\u00a0 }<\/span><br \/>\n<span style=\"color: #0000ff;\">\u00a0\u00a0\u00a0 server {<\/span><br \/>\n<span style=\"color: #0000ff;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 listen 123.123.123.123:28015; # external endpoint of the server<\/span><br \/>\n<span style=\"color: #0000ff;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 location \/ {<\/span><br \/>\n<span style=\"color: #0000ff;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 proxy_pass http:\/\/127.0.0.1:28015; # internal endpoint where RustIO is running<\/span><br \/>\n<span style=\"color: #0000ff;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 proxy_http_version 1.1;<\/span><br \/>\n<span style=\"color: #0000ff;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 proxy_set_header Host $http_host;<\/span><br \/>\n<span style=\"color: #0000ff;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 proxy_set_header Upgrade $http_upgrade;<\/span><br \/>\n<span style=\"color: #0000ff;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 proxy_set_header Connection $connection_upgrade;<\/span><br \/>\n<span style=\"color: #0000ff;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 }<\/span><br \/>\n<span style=\"color: #0000ff;\">\u00a0\u00a0\u00a0 }<\/span><br \/>\n<span style=\"color: #0000ff;\">}<\/span><\/p>\n<p>1.4.) Save and Exit the nginx.conf.<\/p>\n<p>1.5.) In the nginx folder, next to nginx.exe create a .bat file called &#8220;start.bat&#8221; and paste this in it:<\/p>\n<p><span style=\"color: #0000ff;\">start &#8220;nginx&#8221; &#8220;nginx.exe&#8221;<\/span><\/p>\n<p>1.6.) Save the .bat, then right click it, create a shortcut.<\/p>\n<p>1.7.) Press WindowsKey+R type in &#8220;Shell:Startup&#8221; press enter.<\/p>\n<p>1.8.) Copy the shortcut you just created in that directory, that will make your nginx boot up at system boot.<\/p>\n<p>1.9.) Doubble click your shortcut to start nginx.<\/p>\n<p>&nbsp;<\/p>\n<p><strong>Step 2 &#8211; Setting up Rust:IO to use Nginx<br \/>\n<\/strong><\/p>\n<p>2.1.) Go to your Oxide directory where your config, data, plugin and logs folders are located.<\/p>\n<p>2.2.) Go in the &#8220;config&#8221; folder and open up &#8220;RustIO.json&#8221; with an editor.<\/p>\n<p>2.3.) After the line &#8220;<span style=\"color: #ff0000;\">&#8220;enableLocationSharing&#8221;: true,<\/span>&#8221; add &#8220;<span style=\"color: #ff0000;\">&#8220;ipOverride&#8221;: &#8220;127.0.0.1&#8221;,<\/span>&#8221; the whole file should look like this, (you may have other things enabled\/dissabled then i have):<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/puu.sh\/rlufE\/0427e408f6.png\" alt=\"\" width=\"1035\" height=\"296\" \/><\/p>\n<p>2.4.) Save and restart your server.<\/p>\n<p>&nbsp;<\/p>\n<p><strong>Step 3 &#8211; Checking if Rust:io now uses nginx<br \/>\n<\/strong><\/p>\n<p>3.1.) Open up the livemap in your browser.<\/p>\n<p>3.2.) Open Taskmanager on your server, click on Performance then onj the bottom click on resource monitor.<br \/>\n<span style=\"color: #ff0000;\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/puu.sh\/rluXE\/f1b9ff256f.PNG\" alt=\"\" width=\"656\" height=\"597\" \/><br \/>\n<\/span><br \/>\n3.3.) In the new window that opens go on Overview and select the tab network. If you can see something like &#8220;nginx.exe 8574 12.34.56.78&#8221; you should be good. Check the image below for reference:<br \/>\n<span style=\"color: #ff0000;\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/puu.sh\/rlvgX\/7b26e8a276.PNG\" alt=\"\" width=\"656\" height=\"597\" \/><br \/>\n<\/span><br \/>\nIf this is the case, its most likely working, if not then the instructions were unclear \ud83d\ude42<\/p>\n","protected":false},"excerpt":{"rendered":"<p>On this page i show you how to setup an proxy for your Rust:io Live Map. Because the reverse proxy\/webserver &#8220;nginx&#8221; has an awesome performance we will use this for rust. The installation of this is only possible if you run your rust server on a dedicated server, vps, local (afaik). If you have any [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-6018","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/chilloutbude.eu\/index.php\/wp-json\/wp\/v2\/pages\/6018","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/chilloutbude.eu\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/chilloutbude.eu\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/chilloutbude.eu\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/chilloutbude.eu\/index.php\/wp-json\/wp\/v2\/comments?post=6018"}],"version-history":[{"count":9,"href":"https:\/\/chilloutbude.eu\/index.php\/wp-json\/wp\/v2\/pages\/6018\/revisions"}],"predecessor-version":[{"id":6070,"href":"https:\/\/chilloutbude.eu\/index.php\/wp-json\/wp\/v2\/pages\/6018\/revisions\/6070"}],"wp:attachment":[{"href":"https:\/\/chilloutbude.eu\/index.php\/wp-json\/wp\/v2\/media?parent=6018"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}