17 lines
724 B
Markdown
17 lines
724 B
Markdown
# Nginx as a minecraft proxy
|
|
|
|
This njs script will allow you to use nginx as a reverse proxy for Minecraft: Java Edition servers.
|
|
Multiple servers can share one IP:Port pair in a similar fashion to Virtual Hosting on the web
|
|
i.e. where connections are routed to depends on the destination hostname sent by the client.
|
|
If the hostname sent by the client is not known, it will respond like this:
|
|
|
|

|
|
|
|

|
|
|
|
## Installation
|
|
|
|
Copy `mcroute.js` to /etc/nginx (or other directory depending on where your nginx config is),
|
|
and add the contents of `example.nginx.conf` to your nginx config.
|
|
Adjust it to include your server IPs and domains (the domains must point to your nginx).
|