So, I guess you have a Linux VPS or dedicated server, where you can install whatever you want? Good.
For this, we use the bukkit server.
Here are some instructions:
1. Download CraftBukkit's latest build: CraftBukkit - Recommended Build
2. Put the .jar in a folder, for this example we'll use a generic one: ~/craftbukkit
3. Move to the above directory in terminal with 'cd ~/craftbukkit'
4. Create a new file in the minecraft folder and name it craftbukkit.sh
5. Edit the file and paste this into it:
#!/bin/sh
BINDIR=$(dirname "$(readlink -fn "$0")")
cd "$BINDIR"
java -Xmx1024M -jar craftbukkit.jar -o true
6. Make the file executable, either by running "chmod +x ~/craftbukkit/craftbukkit.sh" in a terminal, or by changing the permissions in the file's properties.
7. Then, in terminal, type '~/craftbukkit/craftbukkit.sh' to run to start the server.
8. When you're done playing around, issue the "stop" command in console.
You can run bukkit like described above, but there are other options - you can run the server permanently with an init script or run it with an ASCII interface
EDIT:
Reread your question, could be that I misunderstood. So here is another link to something that should be what you need - Bukkit Webby
Bukkit Webby is a lightweight web administration that is easy and fast
to setup It's made of two components :
WebbyBukkitPlugin is a Bukkit Plugin that interacts with Bukkit, read your server log, find all online users, etc.
WebbyRTK is a RTK module that interacts with RemoteToolkit and run the webserver. Even if Bukkit has been shutdown, the webserver will persists and allow you to restart Bukkit.
Current Features
- Server administration based on Bukkit Remote Toolkit (Start / Stop / Restart / Reload)
- Online configuration files
- Online server log
- Backup management (manual backup, automated restore)
- Easy installation : drop the jars and files as any bukkit plugins, setup port, login and password for webby and RTK, and you are done !
- NO APACHE NEEDED !
There are tons of other bukkit plugins for website administration. If my suggestion is not what you want, you can check the plugins.
I sorted it out by using the following if in my shell script:
if ! screen -list | grep -q $SCREEN_NAME; then
ONLINE=1
else
ONLINE=0
fi
Where $SCREEN_NAME is the server's unique screen name.
Best Answer
Once you have run the server software and port forwarded, in a file named server properties, set whitelist to true. When you've done that, there will be another file called whitelist where you can list the players names that are allowed to join.