Faster then ever!
- Put the BukkitHTTPD.jar in Bukkits plugins folder.
- Start up the server.
- Change the index.html.page
- Have a look at the <yourServerIP>:8107/test.v10 page and it's sources to see how to use the server-side scripting language.
- Change the test.v10 page.
- Add as many other pages as you want.
The configuration can be found in the file plugins/BukkitHTTPD.yml.
You can also change the banner background by editing the BukkitHTTPD.jpg file in the web folder.
Use the following commands to configure the httpd server on the fly:
"/httpd port" to view the server port or
"/httpd port newPort" to set the server port to "newPort" or (this is for the banner)
"/httpd port hide" to toggle the server port hide feature.
"/httpd banner" to toggle the banner switch.
This switch decides if the banner will be created or not.
This is for the banners text color: "/httpd color" to view the color or
"/httpd color newColor" to change the color to "newColor".
"/httpd refresh 60 to set the banner refresh time to 60 seconds (1 minute).
"/httpd plugins to toggle the plugins switch.
This switch decides if plugins are shown on the banner.
"/httpd dir" to view the www folder or
"/httpd dir new/folder/" to change it to "new/folder/".
"/httpd php" to toogle PHP support.
"/httpd php /path/to/php.exe" path to the php(-cli) executable.
"/httpd bans" to toogle the minecraft ban feature.
This feature uses minecraft bans for the http access, too.
"/httpd admin playerName"
This toogles playerNames web admin state, used to administrate the minecraft server through the web browser. See V10 scripting language for more details.
"/httpd error 404" to show the current 404 error page.
"/httpd error 403" to show the current 403 error page.
"/httpd error number file" to set the number error page to file.
v10, php and vhp files supported!
"/httpd reload" to reload the configuration from disk.
"/httpd password pwd" to set your httpd password to "pwd".
"/httpd rmpwd user" to delete the password of user "user".
"/update BukkitHTTPD" to update this plugin. Have a look here for more information.
All httpd commands are secured with this superPerms node:
bukkithttpd.admin: description: Administrate BukkitHTTPD. default: op
except the /httpd password command, which is secured with this one instead:
bukkithttpd.user: description: Be able to change your BukkitHTTPD password. default: true
autoupdate.announce: description: Users with this node will be notified about new updates. default: op
autoupdate.update.bukkithttpd: description: Users with this node will be able to use /update this plugin. default: op
for more information about the autoupdate nodes have a look here.
V10 scripting language
Have a look at this page.
BukkitHTTPD uses the cli version of php (not tested with the cgi version), keep that in mind (different configs, ...)!
You can have a custom php.ini for BukkitHTTPD, simply save it into your bukkits folder (not the plugins folder!). But a few config values are hardcoded.
There's a new file extension, too: vhp. vhp files will get parsed for the V10scripting language and PHP (in that order).
The global php variables are slightly different. There's no $_POST or $_GET, it's all in $argv (and $_SERVER['argv']). Also the $_FILE array has changed. there's only $_FILE['*']['name'] and $_FILE['*']['tmp_name']. This is no longer the case since v0.2 That's the bad news, now the good: There's a new array: $_MINECRAFT ! :)
Please note that you should use .v10 files instead of .php or .vhp whenever you can, simply to reduce the math done on the server.
To use the integrated chat simply access your BukkitHTTPD url and attach /chat to it. Example:
don't forget to set a httpd password first! :)
Since 0.1.5 web admins can reload and shutdown the server from the chat interface, too.
BukkitHTTPD will create a nice-looking banner for you. Example: You'll find it as banner.png in your www folder. To change the background simply change the BukkitHTTPD.jpg file in the same directory.
Custom error pages
BukkitHTTPD supports custom pages for the 403 and 404 HTTP errors.
See Configuration for more information.
- To codename_B for his awesome work.
To the original authors of NanoHTTPD, which is the base of this plugin.This is no longer the case since v0.2
- To Luficer for updating the html/v10 files of the integrated chat.
This plugin is licensed under the GPLv3 and has it's sources included in the jar. With one exception: The files "NanoHTTPD.java" and "NanoHTTPD.class" are licensed under the NanoHTTPD License, which you can read here:
Copyright (C) 2001,2005-2011 by Jarno Elonen <[email protected]> and Copyright (C) 2010 by Konstantinos Togias <[email protected]>
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. The name of the author may not be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.