Skip to content

External WebServer Use

Aurora Lahtela edited this page Nov 1, 2023 · 23 revisions

Plan Header

External Webserver Use

There are two different ways to use a external webserver:

Plan offers some support for use with an external webserver running on the same machine as the minecraft server.
If your webserver is on another machine it gets a lot more difficult to set things up, so those cases are not listed on the documentation.

External Webserver Use: Web files

⚠️ Limited support notice ⚠️
Not all features in Plan are available on the exported web files, because it is not possible to have them without internal webserver:

  • Login & Access control functionality
  • Query-page & 'Click to see'
  • Plugin version history

Enabling HTML Export

Change the export settings to true and change the path to the directory where the files are to be exported. Remember to give read/write permissions to the user running the minecraft server to that location.

# -----------------------------------------------------
# These settings will make Plan write .js, .css, .json and .html files to some location on disk.
# Relative path will render to /plugins/Plan/path
# Make sure user running the server has write permissions to the path.
# -----------------------------------------------------
Export:
    HTML_Export_path: 'Analysis Results' <-- change to your webserver's public_html folder
    JSON_Export_path: 'Raw JSON'
    Parts:
        # Player pages/JSON are only written on join/leave.
        Player_pages: true <-- enable for html
        Players_page: true <-- enable for html
        Server_page: true <-- enable for html
        Player_JSON: true
        Server_JSON: true
    # All player pages/JSON can be exported by using /plan m export players
    Export_player_on_login_and_logout: true
    # If there are multiple servers the period is divided evenly to avoid export of all servers at once
    # Also affects Players page export
    Server_refresh_period: 20
        Unit: MINUTES
Setting Description
HTML_Export_path Folder inside /plugins/Plan/ or a full path to the folder that the HTML files should be exported to.
JSON_Export_path Folder inside /plugins/Plan/ or a full path to the folder that the JSON files should be exported to.
Parts Enables exporting the files to the respective export path. Note that exporting Server JSON and Server page export the same JSON twice in two different locations.
Export_player_on_login_and_logout Export Player html and/or json when the player joins or leaves (To update the player files)
Server_refresh_period Period for the export of server & network html and/or json, as well as players html

If your external web server is serving files from a folder on the machine, it is recommended to copy the full path to the HTML_Export_path setting (For example 'C:\webserver\public_html' or 'etc/webserver/public_html')

Ensure that the user running the minecraft server has write & read permission to the folder you're exporting the files to, otherwise exceptions will occur when creating the files.

On networks HTML is only exported on the proxy server even if the export is enabled on the game servers.

Disabling internal WebServer of Plan

It is possible to disable the WebServer.

Webserver:
  ...
  Disable_Webserver: false
  External_Webserver_address: "https://www.example.address"
Setting Description
Disable_Webserver Disables the WebServer initialization (WebServer is not started on Enable)
External_Webserver_address Address of the webserver hosting the exported Plan files

External_Webserver_address should be set to an address that allows appending of folder names such as /player/playername & /server etc.
If you export the html to a separate folder (eg. ../public_html/plan) The setting should reflect that ("https://www.example.address/plan")

Initial export

  • Use plan(proxy) export players command to render the existing players' pages after enabling the player html setting.
Clone this wiki locally