BukkitHTTPD
BukkitHTTPD
Faster then ever!
Overview
This is a continuation of BukkitHTTPD from codename_B.
Installation
- 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.
Configuration
The configuration can be found in the file plugins/BukkitHTTPD.yml.
After the first server startup you can configure it in-game (see Commands) or edit the file and reload it (see Commands/Reload).
You can also change the banner background by editing the BukkitHTTPD.jpg file in the web folder.
Commands
Use the following commands to configure the httpd server on the fly:
Port
"/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.
Banner
"/httpd banner" to toggle the banner switch.
This switch decides if the banner will be created or not.
Color
This is for the banners text color: "/httpd color" to view the color or
"/httpd color newColor" to change the color to "newColor".
Refresh
"/httpd refresh 60 to set the banner refresh time to 60 seconds (1 minute).
Plugins
"/httpd plugins to toggle the plugins switch.
This switch decides if plugins are shown on the banner.
Directory
"/httpd dir" to view the www folder or
"/httpd dir new/folder/" to change it to "new/folder/".
PHP
"/httpd php" to toogle PHP support.
"/httpd php /path/to/php.exe" path to the php(-cli) executable.
Bans
"/httpd bans" to toogle the minecraft ban feature.
This feature uses minecraft bans for the http access, too.
Admin
"/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.
Error
"/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!
Reload
"/httpd reload" to reload the configuration from disk.
Password
"/httpd password pwd" to set your httpd password to "pwd".
"/httpd rmpwd user" to delete the password of user "user".
Update
"/update BukkitHTTPD" to update this plugin. Have a look here for more information.
Permissions
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.
PHP
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.
Integrated chat
To use the integrated chat simply access your BukkitHTTPD url and attach /chat to it. Example:
myBukkitServer:8107/chat
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.
Banner
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.
Thanks
- 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.
License
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" which aren't present anymore since v0.2 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.
Hi Could you make a version that has no ingame commands please? In my server everyone is an op and I dont want people to change these stuff with commands. I want it that only the settings can be configured through the yml file on the server.
That would be nice if you could
BTW: Great Plugin!!
@Dannne11 As told at the bukkit forums: It works just fine on linux. Just make sure you use the CLI version of PHP.
Hey nice plugin but my webpage (based on php) can't be read by the plugin. and I'm using linux so activate php for the plugin won't work bacuse it want a exe file. and when I don't activate php i get a HUGE amount of errors and the page reloads 10 times a sec. so please can you add suport for linux php. sorry if I have sent several messages about the same thing. I don'y know if i have :P
Ok, new question. Trying to enable php support. I installed the php client, but could only find the 32 version so my path is C:\Program Files (x86)\PHP\php.exe
When I try to use the plugin needing php support it gives a blank page and I'm suspecting it's because php isn't working right...I set the path by doing /httpd php "C:\Program Files (x86)\PHP\php.exe" and then reloaded, but I don't know how to tell if it's working correclty or not...any suggestions?
is the banner size set in stone or can i add a smaller background image. also is there anyway i can more customize the banner such as where the players online and port lines?
@V10lator
Ah, I got the impression that was supposed to spin through all the worlds that I have...I get it now...thx V10lator. :)
Hey all, I'm trying out the test.v10 using http://localhost:8107/test.v10 for the URL and I get back a page saying 1: 'world' not found!
I have several worlds running using MultiVerse currently, do I need to configure something elsewhere for BukkitHTTPD to be able to pickup the different worlds?
good work! It's way better than the original Plugin ;)
[SOLVED]
@V10lator Thanks for responding, is BoxxWorldMap where my problem lies? I thought i would at least get an index page to load but it doesn't load anything.
What can I do to make sure each of my installations are working properly, is there anything i can do to confirm that my installation of BukkitHTTPD is working properly?
EDIT: For testing I grabbed another PC to install uBuntu server 11.1 and minecraft server on with both the plugins and it worked beautifully, map and all. I therefore conclude that there is something missing from MineOS Crux to make this work (tried on two different PC's).
It was quite an experience setting a server up on ubuntu and it's certainly made me appreciate MineOS Crux much more (such a doddle), I doubt I'll move away from MineOS Crux so if that is the problem then alas this will have to be a plugin on the wishlist for future.
EDIT2: I've just found out that MineOS Crux is locked down with iptables (doh!!), not got it running yet but pretty sure it's the issue - i'll post my findings shortly.
EDIT3: All is well, everything is working now ports are opened in iptables, i did the following at the console:
As root:
@V10lator
Sure. I've been running the BukkitHTTPD on a server on my home computer, and the server is usually only up to test plugins for the WYD server, but I'll leave it running for a while so you can have a look. Also, I used quite a bit of the new CSS3 and HTML5. It won't look quite as good on IE, but it usually works fine on Firefox, Chrome, Safari and Opera. The latest version of each at least.
http://24.9.245.160:8107/chat/
If you want, you can sign onto the MC server (24.9.245.160 obviously) and register with the chat client if it lets you (I've been experimenting with bPermissions, and it might not be entirely set up yet)
I've removed the player list (since it didn't seem to work on my server, and seemed relatively unnecessary, assuming that iframe on the right was for the player list) XD
@DrAgonmoray
Thanks DrAgonmoray, the error isn't present anymore with v1.2
I still have a problem though in that I can't access the map webpage, everything seems to start up OK now with no errors present on the console but the web page doesn't load at http://myserver:8107/worldmap
I get the standard "The connection has timed out" message.
I'm running MineOS Crux and I'm not sure if it's missing anything to make this work, what server OS do other people use for their MC server?
Any help would be great, even just pointing me in the right direction.
Thanks
Thanks for the great plugin, I really need it on my server but I have a problem.. My IP is 176.31.226.225:25709, everything is installed and it seems to be working on the server. Anyway I cannot get to website because it says that the link contains unallowed marks (I think they are < and > ). When I remove them it it says it cannot reach. This is what I have tried:
176.31.226.225:8107/test.v10 without luck.
Am I doing the whole thing completely wrong or am I trying wrong link? Thanks!
I've been modifying the chat page to look nicer, and in the process of doing so, I found two potential problems (as I see them). It seems that color coding in the minecraft server returns crazy symbols and unwanted numbers and letters in the chat page. Secondly, inserting a quotation mark (") utterly breaks the chat page until a server reload is done. I managed to fix the color code problem by just replacing all the &0-9,a-f codes with blanks using the replace() method, but I can't seem to achieve the same thing for the quotation marks. Maybe all this is just problematic for me for some reason or another. I'm not entirely sure if this would happen before modifying, but it seems like it would since everything I did prior to that was aesthetic changes. Sorry if this message is placed in the wrong spot. Just wanted to point out this potential problem, and it would be nice for pointer on how to keep the apostrophe from breaking everything.
p.s. Typing a backslash before the quotation mark when chatting will work, but trying replace("\""," "); does not work out quite so well.
@V10lator
Im not using windows... im using Linux Ubuntu 10.10
If the same rule applies, could you please point me in the correct location? I have no idea where to even start looking... :|
Anyone help me with this error, i think it's the same as Dannne11's now i take a second look.
Any advice on where to get help with it or if you have any idea at all what could be the cause? The server is running MineOS Crux if that makes a difference, local on my network.
Everything seems to start up OK but I get the error when i join the server. The web page doesn't load at http://myserver:8107/worldmap either.
Thanks Gil
@Dannne11 Yeah, that's BoxxWorldMap. Are you connecting to a local server hosted on your computer or network? If so, that's the issue, and I really can't fix it. :|
@xclucky This is a security part of windows. I'm not here to give support for windows. ;)
@Dannne11 This is BoxxWorldMaps fault. Don't worry, I will inform DrAgonmoray about it. :)