On this page i show you how to setup an proxy for your Rust:io Live Map.
Because the reverse proxy/webserver “nginx” 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 questions, need more help or what ever im lunatik_cb in the rustservers slack community, DM me there.
All credits go to dcode, the creator of the awesome extension Rust:io.
Step 1 – Installing Nginx on Windows
1.1.) Download the most recent nginx for windows, you can find it here: http://nginx.org/en/download.html
1.2.) Extract the downloaded archive to a simple path, lets just take “C:\nginx”, check the image below:
1.3.) Navigate to the path you extracted nginx, in my case “C:\nginx”, then open the “conf” folder after that open the file “nginx.conf” with an text editor.
Replace the whole content of that file with the text in blue, the line which is “listen 123.123.123.123:28015;” needs to be changed to match YOUR server IP and Port. ONLY change the IP:PORT, DO NOT change or delete the part “listen” and the “;” after the port.
worker_processes 1;
events {
worker_connections 1024;
}
http {
map $http_upgrade $connection_upgrade {
default upgrade;
” close;
}
server {
listen 123.123.123.123:28015; # external endpoint of the server
location / {
proxy_pass http://127.0.0.1:28015; # internal endpoint where RustIO is running
proxy_http_version 1.1;
proxy_set_header Host $http_host;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
}
}
}
1.4.) Save and Exit the nginx.conf.
1.5.) In the nginx folder, next to nginx.exe create a .bat file called “start.bat” and paste this in it:
start “nginx” “nginx.exe”
1.6.) Save the .bat, then right click it, create a shortcut.
1.7.) Press WindowsKey+R type in “Shell:Startup” press enter.
1.8.) Copy the shortcut you just created in that directory, that will make your nginx boot up at system boot.
1.9.) Doubble click your shortcut to start nginx.
Step 2 – Setting up Rust:IO to use Nginx
2.1.) Go to your Oxide directory where your config, data, plugin and logs folders are located.
2.2.) Go in the “config” folder and open up “RustIO.json” with an editor.
2.3.) After the line ““enableLocationSharing”: true,” add ““ipOverride”: “127.0.0.1”,” the whole file should look like this, (you may have other things enabled/dissabled then i have):
2.4.) Save and restart your server.
Step 3 – Checking if Rust:io now uses nginx
3.1.) Open up the livemap in your browser.
3.2.) Open Taskmanager on your server, click on Performance then onj the bottom click on resource monitor.
3.3.) In the new window that opens go on Overview and select the tab network. If you can see something like “nginx.exe 8574 12.34.56.78” you should be good. Check the image below for reference:
If this is the case, its most likely working, if not then the instructions were unclear 🙂