[INACTIVE][ADMN/WEB] BukkitHTTPD 0.0.4 - now with more themable signatures [1000]

Discussion in 'Inactive/Unsupported Plugins' started by codename_B, May 13, 2011.

  1. Offline

    codename_B

    BukkitHTTPD 0.0.4
    For simple HTML based sites, on the same ip as your server. With stats. And signatures.

    [​IMG]
    Now with automatic banner creation! This is an actual banner from my actual server!



    History:
    • So for quite a while now, I've been annoyed at the lack of a "default html" page in bukkit - I want something that I can just set my DNS to and not have to install NGINX or apache, I just want to install my minecraft server and let it run. Well this is just that! No extra programs to install, no extra config files to edit. Just place your html in the right place and it does the rest. Now you can finally have a landing page on the same ip as your server, run by your server! Example: my server
    Usage:
    • Download BukkitHTTP.jar and install in /plugins
    • Run the server once, then stop it.
    • Change the default index.html in /plugins/BukkitHTTPD/index.html to whatever you wish your small html based site to be.
    • Start the server again, once it's started navigate to localhost:8107 (or whatever port you have configured) on the machine the server is hosted on. This should display your index.html
    • There is several configurable options which you must add to server.properties.
    Code:
    http-daemon-port: 8107
    server-name=Localhost Test Server
    server-dns=localhost
    text-color=000000
    • If you want your server to listen on port 80 (ie the standard web port you will need to set it to something like this)
    Code:
    http-daemon-port: 80
    server-name=MyAwesomeMinecraftServer
    server-dns=my.ip.com
    text-color=FFFFFF
    Screenshot:
    [​IMG]


    Current Themes:
    • These are all the themes that I have created/have been created for you by players.
    [​IMG]
    Simple dirt theme. Just replace BukkitHTTPD.jpg with this.
    [​IMG]
    Simple sand theme. Just replace BukkitHTTPD.jpg with this.
    [​IMG]
    Elegance theme by @eastonch with no branding. Just replace BukkitHTTPD.jpg with this.
    [​IMG]
    Simple minecraft theme. Just replace BukkitHTTPD.jpg with this.
    [​IMG]
    Flow theme. Just replace BukkitHTTPD.jpg with this.

    Download:
    • Version 0.0.4 zip bundled with player stats and signature generator Megaupload Mirror
    • Version 0.0.4 zip bundled with player stats and signature generator Main Mirror
    Source
    Thanks:
    • Thanks to spacemaniac and pluckerpluck on #bukkitdev for their help with debugging the exception code.
    • Thanks to the original authors of NanoHTTPD, from which this plugin is based.
    A bit more about:
    • The default port number had to be above 1024 incase users were not running bukkit as root on their system, similar to my hosting setup. If you get a socket error of some kind after trying a port below 1024, this is probably because you're not running as root on a *nix system - windows users should be fine. In which case, you should just direct your users to :8107, talk to your host about running as root, or get a minecraft server from someone who offers extensive NAT configuration such as PigSaddleHost ie. my server listens and serves on port :8107, but you all connect to it on port :80 in your browsers. Fantastic! You can also do this yourself with iptables.
    • I'm also working on modding a version of MCStats to work plug and play with this - providing you with player stats on your webhost!
    • There is now a signature generator bundled with BukkitHTTPD! You can mod this with any image you like, just swap out BukkitHTTPD.jpg for any image of the same dimensions, it will work right away. This will be at yourip/image.png
    • If you have any questions about the stats plugin please ask on their thread. I have bundled a modified version of it with this plugin for ease of use, it will work straight out the box.
    NanoHTTPD License:

    Copyright © 2001,2005-2011 Jarno Elonen <[email protected]> and Copyright © 2010 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.

    Changelog:
    • 14/05/2011 - v0.0.1: wrote source code and released plugin on bukkit.org after extensive testing and going live with it on my server.
    • 15/05/2011 - v0.0.2: changed default html page and bundled a stats plugin.
    • 25/05/2011 - v0.0.3: bundled themable banner creation.
    • 25/05/2011 - v0.0.4: added configurable color for the text. Changed output to .png
     
    Blechbuexse, JWhy, dark1256 and 3 others like this.
  2. Offline

    Walnoot

    What port am I supposed to set this website to? My server's port?
     
  3. Offline

    codename_B

    No, whatever port you want to server the website on.
    If you set it to port :80, you will connect to the website on port :80. It will not affect the port of your minecraft server.
     
  4. Offline

    Walnoot

    Ah ok. I have just one more question, do you have to forward that port?
     
  5. Offline

    rymate1234

    Errr... Yes?

    as its a SERVER, and you nmeed to port forward server ports
     
  6. Offline

    Kostronor

    well, for me, it doesn't work.
    Startup and everything works well (please get the output in a better format, date and [info] are missing on the second and third line.)
    But accessing to the server just fails, it gives a "not found"
    only, if i access server:8107, than it works.
    (i'm hosting my server on nitrado.net, any clue whats the problem?)
     
  7. Offline

    Walnoot

    try localhost:1807
     
  8. Offline

    codename_B

    Wait, what's not working? Where is it that I even output data and [info]? What? I have no idea what you're talking about.

    If you can access server:8107 it is working... You need to CONFIGURE THE PORT in server.properties, ike it says in my original post.
     
  9. Offline

    Kostronor

    so, first the log-issue:
    Code:
    2011-05-17 21:27:13 [INFO] NanoHTTPD 1.21 (C) 2001-2011 J Elonen and K Togias
    Modified for use with bukkit.
    BukkitHTTPD 0.0.1 (C) 2011 codename_B
    thats printed out in my server.log on startup.
    And because of only the first line having 2011-05-17 21:27:13 [INFO] before it, it messes up the structure of the log-data.

    for the second thing:
    Well, i read your post, that is not the problem.
    i tried it with the standart-port(8107) it works only while accessing the port:
    f.e. wusebi.de doesn't woks, only wusebi.de:8107
    i tried it with the port, i am using on my server (standart 25565)
    doesn't works at all, even if writing wusebi.de:25565
    and i tried port:80, same as 25565.

    So my question is, is it possible to just use wusebi.de to get to that port?
    And no, i don't get any error while accessing to the server, just:
    Code:
    2011-05-17 23:03:34 [SEVERE] java.io.IOException: Bad packet id 71
    2011-05-17 23:03:34 [SEVERE]     at net.minecraft.server.Packet.a(Packet.java:78)
    2011-05-17 23:03:34 [SEVERE]     at net.minecraft.server.NetworkManager.f(NetworkManager.java:127)
    2011-05-17 23:03:34 [SEVERE]     at net.minecraft.server.NetworkManager.c(NetworkManager.java:226)
    2011-05-17 23:03:34 [SEVERE]     at net.minecraft.server.NetworkReaderThread.run(SourceFile:69)
     
  10. Offline

    codename_B

    Any website without specifying the port goes to port 80.
    If you set it as port 80 is server.properties (which I absolutely 100% guarantee you didn't!) why are you trying to access it on any other port that what is configured?

    Here is what to do.
    • Set up an iptables port redirect from port 8107 internally to port 80 externally OR if you are running as root/privelaged user.
    • Add this line to your server.properties file (if you don't know what this is, stop now and go learn about running a minecraft server.) http-daemon-port: 80
    • Stop your server completely and restart it.
    As far as my formatting messing up your log, I'm sorry, but you don't seem to be able to understand the basic concept of the internet.

    Your minecraft server listens on port:25565 - it is impossible for another application to listen on this port at the same time. Only minecraft can connect to this port and do anything, a web browser does NOTHING.
    This listens on port:8107 by default - if you connect to yourip:8107 then you will be able to see the web page just fine, if you connect to anything else yourip:8106 or youip:80 (ie just yourip, since the whole internet is on port:80 by default) then it will not work. You can only connect on the port that something is configured to listen on.

    If you can connect on port 8107 that means this plugin works fine. That bad packet id is sent by minecraft itself because YOU are trying to connect to minecraft with a web browser. This isn't a bug in minecraft, it's a bug in you.

    Lastly, let me remind you that you've told me my plugin works fine, my log formatting doesn't work, and that you don't know how to add a line to server.properties. Is this correct, and if so, would you like me to set it up for you?
     
  11. Offline

    Imm0rt41

    does this increase server performance in any way?
     
  12. Offline

    Kostronor

    Do you think, everyone asking here is dumb, just because something did not work?
    well, never mind, i think, we both just misunderstand us.
    I surely know how the internet works and i surely know how to add a new line to server.properties.
    I have done that to change to port 80...
    I don't know how you've developed your plugin, you could check on port:25565 if the request comes from a browser and then redirect it to the index.html.

    I'm sorry that I've stolen you some time, i think i will use my A-record for this...

    PS: Just from Plugin Developer to Plugin Developer, i think, for everyone using your plugin and who is checking every startup for errors, they will see your plugin falling out of the line. That kosts some time and nerves, because you have to wonder yourself every time, why this plugin don't uses the normal format of minecraft.
    This surely is something minor, but for the sake of your plugin-users i would say, it would be better to add the format the each line of your output.
    If it helps you, use a logger, that will automatically format every printed out text.
     
  13. Offline

    MemoryThief

    I want to start by saying this is a very useful plugin, and I would like to see it be as light weight as possible. I find it to be very powerful and stable.
    However I notice many people talking about getting port 80 to work because they want their server page to come up as the correct IP with the port :8107 extension. This may be impossible for many of you users who are hosting from a residential ISP. Many residential ISPs block port 80 incoming, so you may be trying to get a request that can't be gotten. I noticed even after changing my IPTables within my outer network (router) to get port 80 to redirect to 8107 I could only access it myself behind my own network.
    In order to correct this issue, I used another DNS to point to the ip : port address and then syndicate the DNS to my fellow clients.
    Some people may want to use this page without getting the same ip, and it may be possible, but you will want it on another port if you want people to interact with it, so you're better off redirecting them locally from port 80 to another port for interaction....
    Awesome plugin Codename_B...
     
  14. Offline

    codename_B

    Yay! Glad it helped you :) Good to see someone who knows what they're doing and is able to use this for what it's supposed to be used for ^^ I'd be very interested to see what you are doing html-wise with this if you're feeling like sharing links.

    Why would someone be visiting port 25565 expecting a website?
    A: as far as I know I'd have to edit minecraft itself to do that
    B: as far as I know you're the only person who has tried that, and will try that

    ?

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jul 16, 2016
  15. Offline

    Imm0rt41

    talking about the whole web thing, does that mean a web server or something. like a free dedicated web host. is that what this is.
     
  16. Offline

    codename_B

    That's what this is. It turns your bukkit server into a web host too, instantly.
     
  17. Offline

    Imm0rt41

    thus increasing server performance? or just making it able to host a website thingy.
     
  18. Offline

    scar_

    just making it able to host a website thingy.
     
    codename_B likes this.
  19. Offline

    codename_B

    Why would it increase server performance? If you can think of any reason that it would, then yes.

    Otherwise, no. It doesn't impact server performance though, the web server itself is tiny (about 3kb) so you don't even notice it's running, until people see your awesome web page that is!

    See http://ubempire.com - that whole site is served directly from bukkit.

    And before you ask, no. It doesn't increase server performance, I have no idea where you got this from.

    P.S. it doesn't increase server performance, it serves a website.
     
  20. Offline

    Imm0rt41

    i was asking because alot of dedicated servers are run off webhosts. the thing is because you know exactly what this plugin does and is for, you wont get where i got this idea.
     
  21. Offline

    sileNtzM

    Do you think it would be difficult to create a plugin to start, shutdown, restart and show the logs of the serveur in a web page? I don't really know Java scripting, I already edited your MCStats.jar plugin to change the web page created, but building a whole plugin is too much for me. Thanks
     
  22. Offline

    codename_B

    These plugins exist already, however that is outside the scope of this plugin.
     
  23. Offline

    SoccerSTa01

    i just want to get something clear. If i make a bukkit server, and download this, then this will host my server and wont cost any money or use up any of my internet?
     
  24. Offline

    sileNtzM

    Can you give me the names of those plugins? I didn't find anything from the search function. Thank you.
     
  25. Offline

    Niklas4G

    Can I change the port 8107 to 80 or 8000 ?
    P.S. My server IP has a different server also: /
     
  26. Offline

    codename_B

    You can change the port to anything you like, that is what the configuration option is for.
    Most of the things you are asking for are only available in a "server wrapper" plugin. You can't find those in plugins most of the time.
     
  27. Offline

    JackTDawson

    Its looking good bro. Keep it up. :)
     
  28. Offline

    crafta

    Everything is working great !!
    and I thought of a feature request, that isn't php, mysql or console support.

    S.S.I !! Server Side Includes
    <!--#include virtual="../quote.txt" -->http://en.wikipedia.org/wiki/Server_Side_Includes

    would this be possible or am i also dreaming too big lol.
     
  29. Offline

    Lolmewn

    interesting..
     
  30. this works perfectly!
     
    codename_B likes this.

Share This Page