diff --git a/External-Webserver-Basics.md b/External-Webserver-Basics.md index 4bb46d0..a65ac07 100644 --- a/External-Webserver-Basics.md +++ b/External-Webserver-Basics.md @@ -5,36 +5,135 @@ This page assumes * Your Web Server supports PHP. (Only needed for web-to-Minecraft chat) * If you are on Linux, you should know how to use the terminal and `chmod`. -#### Disable the internal updating machanism +#### Step 1: Disable the internal updating machanism in plugins/dynmap/configuration.txt To disable the internal updating mechanism and enable the json-file updating mechanism. This will write to the file `standalone/dynmap_world.json` in your web-path at an interval that is specified with `writeinterval`. -Change the following: +Change the following: (line 42 untill 75) ```yaml - class: org.dynmap.InternalClientUpdateComponent sendhealth: true + sendposition: true allowwebchat: true webchat-interval: 5 + hidewebchatip: false + trustclientname: false + includehiddenplayers: false + # (optional) if true, color codes in player display names are used + use-name-colors: false + # (optional) if true, player login IDs will be used for web chat when their IPs match + use-player-login-ip: true + # (optional) if use-player-login-ip is true, setting this to true will cause chat messages not matching a known player IP to be ignored + require-player-login-ip: false + # (optional) block player login IDs that are banned from chatting + block-banned-player-chat: true + # Require login for web-to-server chat (requires login-enabled: true) + webchat-requires-login: false + # If set to true, users must have dynmap.webchat permission in order to chat + webchat-permissions: false + # Limit length of single chat messages + chatlengthlimit: 256 + # # Optional - make players hidden when they are inside/underground/in shadows (#=light level: 0=full shadow,15=sky) + # hideifshadow: 4 + # # Optional - make player hidden when they are under cover (#=sky light level,0=underground,15=open to sky) + # hideifundercover: 14 + # # (Optional) if true, players that are crouching/sneaking will be hidden + hideifsneaking: false + # If true, player positions/status is protected (login with ID with dynmap.playermarkers.seeall permission required for info other than self) + protected-player-info: false + # If true, hide players with invisibility potion effects active + hide-if-invisiblity-potion: true + # If true, player names are not shown on map, chat, list + hidenames: false #- class: org.dynmap.JsonFileClientUpdateComponent # writeinterval: 1 # sendhealth: true - # allowwebchat: false + # sendposition: true + # allowwebchat: true + # webchat-interval: 5 + # hidewebchatip: false + # includehiddenplayers: false + # use-name-colors: false + # use-player-login-ip: false + # require-player-login-ip: false + # block-banned-player-chat: true + # hideifshadow: 0 + # hideifundercover: 0 + # hideifsneaking: false + # # Require login for web-to-server chat (requires login-enabled: true) + # webchat-requires-login: false + # # If set to true, users must have dynmap.webchat permission in order to chat + # webchat-permissions: false + # # Limit length of single chat messages + # chatlengthlimit: 256 + # hide-if-invisiblity-potion: true + # hidenames: false ``` To: ```yaml #- class: org.dynmap.InternalClientUpdateComponent - # sendhealth: true - # allowwebchat: true - # webchat-interval: 5 + # sendhealth: true + # sendposition: true + # allowwebchat: true + # webchat-interval: 5 + # hidewebchatip: false + # trustclientname: false + # includehiddenplayers: false + # # (optional) if true, color codes in player display names are used + # use-name-colors: false + # # (optional) if true, player login IDs will be used for web chat when their IPs match + # use-player-login-ip: true + # # (optional) if use-player-login-ip is true, setting this to true will cause chat messages not matching a known player IP to be ignored + # require-player-login-ip: false + # # (optional) block player login IDs that are banned from chatting + # block-banned-player-chat: true + # # Require login for web-to-server chat (requires login-enabled: true) + # webchat-requires-login: false + # # If set to true, users must have dynmap.webchat permission in order to chat + # webchat-permissions: false + # # Limit length of single chat messages + # chatlengthlimit: 256 + # # Optional - make players hidden when they are inside/underground/in shadows (#=light level: 0=full shadow,15=sky) + # hideifshadow: 4 + # # Optional - make player hidden when they are under cover (#=sky light level,0=underground,15=open to sky) + # hideifundercover: 14 + # # (Optional) if true, players that are crouching/sneaking will be hidden + # hideifsneaking: false + # # If true, player positions/status is protected (login with ID with dynmap.playermarkers.seeall permission required for info other than self) + # protected-player-info: false + # # If true, hide players with invisibility potion effects active + # hide-if-invisiblity-potion: true + # # If true, player names are not shown on map, chat, list + # hidenames: false - class: org.dynmap.JsonFileClientUpdateComponent writeinterval: 1 sendhealth: true - allowwebchat: false + sendposition: true + allowwebchat: true + webchat-interval: 5 + hidewebchatip: false + includehiddenplayers: false + use-name-colors: false + use-player-login-ip: false + require-player-login-ip: false + block-banned-player-chat: true + hideifshadow: 0 + hideifundercover: 0 + hideifsneaking: false + # # Require login for web-to-server chat (requires login-enabled: true) + webchat-requires-login: false + # # If set to true, users must have dynmap.webchat permission in order to chat + webchat-permissions: false + # # Limit length of single chat messages + chatlengthlimit: 256 + hide-if-invisiblity-potion: true + hidenames: false ``` +do not uncomment the comments, these will have two #'s in front of the configuration line. These lines are only to explain the option and will break your config if they are uncommented. -#### Disable the internal webserver +#### Step 2: Disable the internal webserver -To disable the internal webserver change the following. +To disable the internal webserver change the following line (340). ```yaml # Disables Webserver portion of Dynmap (Advanced users only) @@ -48,10 +147,10 @@ To: disable-webserver: true ``` -#### Copying files to your webserver and change paths +#### Step 3: Copying files to your webserver and change paths Copy your files in `plugins/dynmap/web` to a directory of your webserver. Change configuration.txt so that it points with both `tilespath` and `webpath` to the paths where you placed the web-files. -For *nix +For *nix based systems: ```yaml # The path where the tile-files are placed. @@ -70,7 +169,7 @@ tilespath: c:\\path\\to\\web\\server\\dynmap\\web\\tiles # The path where the web-files are located. webpath: c:\\path\\to\\web\\server\\dynmap\\web ``` - +#### Step 4: apply configuration changes. Now *restart* your Minecraft server. Join your Minecraft server and place a few blocks (randomly) to trigger dynmap to generate tiles for your map. You can also type `dynmap fullrender worldname` in your server console to render the whole world with the name `worldname`. @@ -82,9 +181,34 @@ Now refresh your browser. It should now display online players on *http://mywebs **If you don't see any players or don't see the players moving**, go to *http://mywebserver/standalone/dynmap_world.json* (where *world* is the name of your world). You should see some code and hitting refresh every few seconds should change that code (the servertime should be updated). If this file is not there or you don't see the file changing, you likely have filled in the wrong `webpath` in the configuration. -In Linux, **if web-to-mc-chat does not work**, you also need to chmod the 'standalone' folder to 775 or 777: +In Linux, **if web-to-mc-chat does not work**, you also need to chmod the 'standalone' folder to 77x choose any of the following and try the next one if the one you chose doesn't work: - $ chmod -R 775 standalone + $ chmod -R 770 standalone +770 +symbolic | rwxrwx--- +user | read, write and execute +group | read, write and execute +others | no permission + +774 +symbolic | rwxrwxr-- +user | read, write and execute +group | read, write and execute +others | read + +775 +symbolic | rwxrwxr-- +user | read, write and execute +group | read, write and execute +others | read, write + +777 +symbolic | rwxrwxr-- +user | read, write and execute +group | read, write and execute +others | read, write and execute + +generally "$ chmod -R 770 standalone" should do fine, only use the others if you know what you are doing. This is to allow `sendmessage.php` to create the jsonfile. This is needed because its your Web Server creating the file and not the minecraft server.