Dynmap: How do I make my Dynmap run on my domain

Created on 8 Dec 2019  路  8Comments  路  Source: webbukkit/dynmap

I want it to be map.[mydomain]

Answered Question

Most helpful comment

You want an A or CNAME record as map.example.com pointed towards whatever domain or IP your dynmap webserver is located on. If it's an IP, use an A or AAAA record. If it's a domain name, use a CNAME record.

All 8 comments

You can redirect from map.[] subdom to dynmap webserver

I know, but I want it to run on my domain so it shows map.mydomain at the top

You need to set up your DNS records to do this, this issue isn't really in the scope of Dynmap. Learn about CNAME and A records and change your DNS zone configuration to match.

How would I do the CNAME? Do i do it like i did it with Minecraft?

You want an A or CNAME record as map.example.com pointed towards whatever domain or IP your dynmap webserver is located on. If it's an IP, use an A or AAAA record. If it's a domain name, use a CNAME record.

To add on to this, if you want your dynmap to run on your webserver, you need to set it up by following this guide:
https://github.com/webbukkit/dynmap/wiki/Setting-up-without-the-Internal-Web-Server
This guide assumes you have a web server set up on the same system as your Minecraft server.

As @Technoguyfication indicated, what you are talking about is "How do I use DNS?" and isn't at all about Dynmap (or any other web or IP app) - you need to configure DNS to point to the IP address (using an A or AAAA record) or existing DNS name (using a CNAME record), and doing so is done via your domain registrar/hosting. DNS controls how you get to a destination - there isn't anything the code at the destination (e.g. Dynmap or a web server) can do to get you there.

I use nginx reverse proxy to do this:
First set DNS record map.mc.mydomain.com to my your server:

map $http_upgrade $connection_upgrade {
    default upgrade;
    ''      close;
}

# HTTPS server to handle JupyterHub
server {
    listen 80;
    listen 443 ssl;

    server_name map.mc.mydomain.com;
#if you want use https, get letsencrypt cert first 
        ssl_certificate     /etc/letsencrypt/live/map.mc.mydomain.com/fullchain.pem;
        ssl_certificate_key /etc/letsencrypt/live/map.mc.mydomain.com/privkey.pem;
        location /.well-known {
            alias /var/www/html/.well-known;
        }
    # 
    location / {
        proxy_pass http://localhost:8123;
        proxy_set_header Host $host;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-NginX-Proxy true;
        proxy_set_header X-Real-IP $remote_addr;

        # websocket headers
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection $connection_upgrade;
    }

}

and I think this issue isn't dynmap's issue.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

idlenexusgaming picture idlenexusgaming  路  4Comments

ThorinEk picture ThorinEk  路  5Comments

mibby picture mibby  路  4Comments

TomberWolf picture TomberWolf  路  4Comments

Blueeyestar picture Blueeyestar  路  3Comments