Help - Search - Members - Calendar
Full Version: Tutorial - For Using The Xbox As A Server
Scenyx Entertainment Community > Xbox1 Forums > Software Forums > *nix OS on Xbox
green_beetle
How to run a web server from an Xbox
By green_beetle

Introduction:
An Xbox is basically a fully equipped pc that’s includes a Intel Celeron 733 MHz CPU, an NVIDIA geforce 3mx, 64mb of RAM, 8GB hard disk, 10/100 Ethernet and a DVD drive.
With some minor adjustments you can setup Linux on your Xbox and dedicate it as a web server. In this tutorial I will be demonstrating how to do this using XDSL (Xbox damn small Linux) running the monkey HTTP daemon.

What you need:
1. An Xbox! (modded of course)
2. USB keyboard + mouse (optional)
3. A website to host
4. Some patience

Step 1 Install XDSL
- Download xdsl from http://www.x-dsl.org/wiki/Download
- Install xdsl on your Xbox using one of the various methods located at: http://www.xbox-linux.org/wiki/XDSL_HOWTO

Step 2 Find your Xbox’s IP
Open Xterminal and type in Ifconfig
Your IP is listed under ‘inet addr:’
Write this address down to refer to later, or memorise it.
IPB Image

Step 3 setting up VNC for remote access
(Optional, good for when your PC is in another room to your Xbox)

Installing VNC on the xbox
- Open MyDSL on the XDSL desktop
- Click on ‘net’ then scroll down the list and find nvc4x-1.4.6.dsl.info. This will then display some info, hit download and it should download the VNC server and install it to your desktop.
- Open Vnc4x0 on your xdsl desktop.

Installing the VNS client on your PC
- Download realvnc from http://www.realvnc.com/cgi-bin/download.cgi
- Once installed Run VNC viewer
- Type in your xbox ip (found in step 2) as the server and hit ‘ok’
- This should then open up a window displaying the XDSL desktop happy.gif

From here you can control your xbox without needing it to be connected to your tv or any controller, keyboard or mouse etc.
IPB Image

Step 4 Install PHP on the Xbox (optional if you want to host PHP files)
Open MYdsl on the xdsl desktop
Open ‘System’ and scroll down to ‘ php-4-monkey0.9.1.info’
It will open a info box with some details, hit download and it will install PHP on your Xbox so you can host php developed websites.

Configure monkey websever to open your PHP index file. Open emelfm as a super user by right clicking the xdsl desktop
Apps>tools>emelFM> emelFM as super user
In emelFM open the dir /opt/monkey-0.9.1/conf/ open the file monkey.conf and edit the line
Indexfile: index.htm index.html

Add to the line index.php and hit save.

*Note: from monkey.conf you can also set the port that monkey server listens on.
Useful if you ISP blocks port 80, you can use the alternative port 8080.

Step 5 Start the monkey HTTP daemon
Right click the xdsl
System > Daemons > Monkey web server > Monkey Start
IPB Image
Test that web server is running by typing your IP address into firefox and it should display an image and say monkey server is running.

*Note: Disable any proxies that are configured in firefox otherwise you won’t be able to connect.

Step 6 setting up FTP to upload files
Right click the xdsl
System > Daemons > FTPd > betaFTPd start
Using your favourite ftp program (I suggest flash fxp) connect to your Xbox using the ip we found earlier in step2
Once connected open the directory /opt/monkey-0.9.1/htdocs/
And delete the default “index.html” from here you can upload your own website files.

*Note: port 21 may need to be opened on your router to access ftp on your network to your xbox.



Trouble shooting the monkey server
Do it in this order
1. Connect to your website from the Xbox found in step 4
(If you cannot, the monkey HTTP daemon is not running)
2. Connect to your website from another computer on your Local network.
(If you can’t access your site your port 80 may be blocked, please open this port on your router)
3. Connect to your website from a computer across the internet
(If you can’t access your site from the internet your public ip may not have port 80 opened, open this port for you public ip)


If you need any help or find any flaws in the tutorial you can find me on xbox-scene or email me at greenbeetle@gmail.com. You can visit my website hosted from my xbox of course at markkram.dyndns.org (copy and paste into browser)

Cheers.
awal
thanks for the tut beerchug.gif

Ive been trying to find a good tutorial on this smile.gif

Just a hints:

All of the linux's I have tried dont show up on my component pack (high def)

atrizzz
i am stuck at step 6. i can connect to xdsl using flashfxp and end up in the directory /home/dsl/. when i get to the index.html file i cant delete it or transfer anything over. got any suggestions?
green_beetle
login as root for the ftp
user: root pass: xbox
or
user: dsl pass: dsl
atrizzz
if i try to login as user: root pass: xbox i get:

QUOTE
[R] Connecting to 192.168.0.101 -> IP=192.168.0.101 PORT=21
[R] Connected to 192.168.0.101
[R] 220 BetaFTPD 0.0.8pre17 ready.
[R] USER root
[R] 331 Password required for root.
[R] PASS (hidden)
[R] 530 Login incorrect.
[R] Connection failed
[R] Delaying for 120 seconds before reconnect attempt #1


when i login as user: dsl pass: dsl i can connect, and transfer files over but i cant leave the directory /home/dsl/. if i do i usually get a connection lost error. when i can go into different directories i cant transfer anything over or delete anything.
atrizzz
sry about all the questions but im new to this.


i fixed my problem with ftp. now my only question is how do i make a name for my website. right now i go there by using the ip address. your website is http://greenbeetle.no-ip.org i cant figure out how to make one for myself.
green_beetle
no-ip.org
register
and download the client that updates your ip to the no-ip address that you set.

so far i have only been able to get the client working on a PC and not on the xbox. This is a problem if you want to leave your webserver on 24-7 as the PC has to also be on to update your ip if it changes.
Potato Bob
we could always just strip down dsl and just have appache with ssh and samba and ftp mysql etc...
Keo-Keo
In my tutorials i have XAMPP working for XDSL check it out.. After downloading apache mysql perl and php are running in seconds.. No Linux Knoledge Needed.
LonelyMind
QUOTE
if i try to login as user: root pass: xbox i get:


QUOTE
[R] Connecting to 192.168.0.101 -> IP=192.168.0.101 PORT=21
[R] Connected to 192.168.0.101
[R] 220 BetaFTPD 0.0.8pre17 ready.
[R] USER root
[R] 331 Password required for root.
[R] PASS (hidden)
[R] 530 Login incorrect.
[R] Connection failed
[R] Delaying for 120 seconds before reconnect attempt #1


when i login as user: dsl pass: dsl i can connect, and transfer files over but i cant leave the directory /home/dsl/. if i do i usually get a connection lost error. when i can go into different directories i cant transfer anything over or delete anything.


i am having this exact same problem...
atrizzz, what did you do to get FlashFXP to allow you to write to other directories?

and will backing up hda50 save everything that was done in this tutorial? or is there somthing else i need to do for dsl to remember the settings? lol...kinda scared to turn off my xbox... unsure.gif
ximmortalxxkingx
QUOTE(LonelyMind @ Jan 14 2006, 08:05 AM) *

i am having this exact same problem...
atrizzz, what did you do to get FlashFXP to allow you to write to other directories?

and will backing up hda50 save everything that was done in this tutorial? or is there somthing else i need to do for dsl to remember the settings? lol...kinda scared to turn off my xbox... unsure.gif



i can get it to write in everything EXCEPT http docs....so weird, i even gave all permissions
ximmortalxxkingx
QUOTE(ximmortalxxkingx @ Feb 8 2006, 07:30 PM) *

i can get it to write in everything EXCEPT http docs....so weird, i even gave all permissions


nevermind, i realized i didnt give permissions, that was the problem. works fine now..check it out biggrin.gif

http://ecclan.servecounterstrike.com
awal
Nice work smile.gif I really like the layout, but the first page loaded awefully slow. (could be my crappy connection, who knows)
LonelyMind
Nice work. Glad to see someone got this working.
I still can't seem to get the permissions right.... everytime i change them they default back...(in the command line and in emelfm as root)
And also it won't accept a php page...even tho i have index.php in the config file it just displays the code. Any ideas?
Oh...and does anyone know how to set it up so that the server starts right when you start linux?
Any help would be appreciated. Thx.
ximmortalxxkingx
QUOTE(LonelyMind @ Feb 13 2006, 11:33 PM) *

Nice work. Glad to see someone got this working.
I still can't seem to get the permissions right.... everytime i change them they default back...(in the command line and in emelfm as root)
And also it won't accept a php page...even tho i have index.php in the config file it just displays the code. Any ideas?
Oh...and does anyone know how to set it up so that the server starts right when you start linux?
Any help would be appreciated. Thx.



the only reason my php works is because i decided not to use monkey webserver, i simply went to myDSL, click "net" then click download apache. it downloaded and installed in under a minute, with full php support biggrin.gif .
I couldnt get php working with monkey for some reason.

The pages were loading really slow today cuz ive been downloading dev stuff all day, sorry...That, and my connection ic pretty crappy lol. Im currently working on getting mysql to work... pop.gif thanks for all the replys
LonelyMind
Thanks ximmortalxxkingx. Installed apache and php finally works tongue.gif. Now if i could only figure out wats wrong with my code... unsure.gif
Btw, sweet CS site smile.gif
x-fox
If anyone is looking for an easy way to install apache/php/mysql/proftp


1, open a terminal window and login as root.

2, type the following command to download xampp-linux-1.5.1.tar.gz:


wget http://kent.dl.sourceforge.net/sourceforge...ux-1.5.1.tar.gz

the url above is the nearest sourceforge mirror to me in the uk.

3, type the following command to extract the archive.

tar xvfz xampp-linux-1.5.1.tar.gz -C /opt

4, type the following command to start apache, php, and mysql.

/opt/lampp/lampp start

5, By default no security is setup for apache, mysql, phpmyadmin or the ftpserver,
You can easily setup passwords for the above by typing the following command.


/opt/lampp/lampp security

Thats it simple yup.


ximmortalxxkingx
QUOTE(LonelyMind @ Feb 15 2006, 04:25 AM) *

Thanks ximmortalxxkingx. Installed apache and php finally works tongue.gif. Now if i could only figure out wats wrong with my code... unsure.gif
Btw, sweet CS site smile.gif



no prob, glad i could help biggrin.gif If you need any help pm me biggrin.gif

QUOTE(x-fox @ Feb 16 2006, 01:29 AM) *

If anyone is looking for an easy way to install apache/php/mysql/proftp
1, open a terminal window and login as root.

2, type the following command to download xampp-linux-1.5.1.tar.gz:


wget http://kent.dl.sourceforge.net/sourceforge...ux-1.5.1.tar.gz

the url above is the nearest sourceforge mirror to me in the uk.

3, type the following command to extract the archive.

tar xvfz xampp-linux-1.5.1.tar.gz -C /opt

4, type the following command to start apache, php, and mysql.

/opt/lampp/lampp start

5, By default no security is setup for apache, mysql, phpmyadmin or the ftpserver,
You can easily setup passwords for the above by typing the following command.


/opt/lampp/lampp security

Thats it simple yup.


Sry for doulbe post but, an even easyer way (at least i think) is to use keo-kens way:

1. Log in to XDSL or Ssh in.
2. Type wget http://www.x-dsl.org/downloads/XAMMP.sh
3. Type chmod 777 XAMMP.sh
4. Type ./XAMMP.sh
5. Enjoy


x-fox
QUOTE(ximmortalxxkingx @ Feb 21 2006, 12:17 AM) *

no prob, glad i could help biggrin.gif If you need any help pm me biggrin.gif
Sry for doulbe post but, an even easyer way (at least i think) is to use keo-kens way:

1. Log in to XDSL or Ssh in.
2. Type wget http://www.x-dsl.org/downloads/XAMMP.sh
3. Type chmod 777 XAMMP.sh
4. Type ./XAMMP.sh
5. Enjoy


Yes both methods should work fine. but you may have to check the version number of the xampp distribution in keo's scripts and my post as a newer version is now available plus you may want to change the sourceforge url to a local mirror near you.
Keo-Keo
Hehe yea.. I got lazy and didn't include mutiple choices for mirrors.. :-P
jaymunee80
Well, I followed the tut, and it works from my lan. But when I access it from outside, it just says network unreachable, I am guessing this is from my ip blocking the ports. From proxy sites, it says timeout. How can I fix this?
Keo-Keo
Are you using your external IP? Do you have a router? If so do you have DMZ or Portfowarding turned on?
jaymunee80
All three are a yes. External ip is 68.xx.xx.xx, I do have a router, and I have port 80,21, and 8080 forwarded. Ill try dmz, but I dont think that will help.
Chronic Mitosis
Hi, I am new to linux and trying to open port 80 on xdsl. I have used this command line:

iptables -I INPUT -p tcp --dport 80 -j ACCEPT

and get the message: "can't initialize iptables table 'filter': iptables who? (do you need to insmod?)
Perhaps iptables or your kernel needs to be upgraded"

I installed iptables from mydsl and I don't really know about kernel upgrading. I got a little help and the person told me that the iptables and ipfilters modules need to be loaded but I can't find any information on how to load them in dsl. Could anyone help me out?
ssjdave80
Well I followed these directions but I got nowhere because I would always get a cannot write to disk because of no space dunno why since I have a 250 gb hdd which is half empty. I did it on my own by goign to sourceforge and downloading it manually and trasnferring it to opt. ANyway i tried starting it my /opt/lampp/lampp start
but it said
Starting Apche with SSH
(13) Permission denide make socket: could no bind to address 0.0.0.0:43 no listening sockets available, shutting down. Unable to open lass. Error COuldnt start Apache
starting Mysql...
starting ProFTPD
box- unable to set daemon groups: Operation not permitted
box- unable to set wid to 6553, current wid: 101
Error! couldnt start ProFTPD.
WHat gives oin the desktop it shows my local ip of 192.168.1.109 so how do i fix this problem. THanks
ssjdave80
i got xampp working now but apache is still having the same problem with this 0.0.0.0:443 error thing. what can it be.
ssjdave80
i figured out it had something to so with ssl.conf. I then tried staryting apache and ti worked but not i get this error when attempting to access my xbox. through its ip.
Bad Request
Your browser sent a request that this server could not understand.
Reason: You're speaking plain HTTP to an SSL-enabled server port.
Instead use the HTTPS scheme to access this URL, please.


Hint: https://localhost:56734/


--------------------------------------------------------------------------------

Apache/2.0.47 (Unix) mod_perl/1.99_08 Perl/v5.8.0 mod_ssl/2.0.47 OpenSSL/0.9.7 PHP/4.3.2 DAV/2 Server at localhost Port 56734

edit: nevermind solved I just use https:// instead of http:// . Can anyone tell me whats the difference? is ssh more secure?
InfernO8
How do I change the file permission on my htdocs folder? Thanks.
JBmtk
Great tut and follow up comments everyone biggrin.gif biggrin.gif


I have one question though.....how can I make an DNS name, like www.xxxxx.com or whatever? I think I may need to regestir but where at?

I got everything working, just that handing out an IP address is just no so convient when I can place a name there.
JBmtk
NVM, i figured out my problems and I'll explain how to solve them unlike some posts here.

First of all, I was unable to login via FTP with with root as username and pass as xbox. I still can't, but I don't think you can in the first place. If anyone has an answer, please post


To set permissions in xdsl, go to that editor mentioned in the tutorial...don't use the shortcut on Xdsl's desktop, because you need super-user priveleges. Then, navigate to /opt. Then, right click or go to shortcut where you can "set permissions". A box will come up, and make sure all of the boxs are darkned so none are "popping up" at you so to speak. You can double check if you scroll all the way to the right in that same editor or in your FTP program to see the permissions....should look like -Dsmwxmsx or something like that. Make sure all are enabled. I know you don't need all them enabled, but its just easier this way, unless you want security. Oh, and don't forget to hit, "apply for all" (which would be the subfolders inside)

Now, you can write to the monkey folder.


For DNS, you will need to regestir one at like 1and1 hosting solutions. domain names are very cheap like 5$ a year. Also, the no-ip mentioned in this thread would also work and its free.


lloydmedley
Ive got a question.. finally got it working (2 hours later.. its 2:16am here haha). However not all my files are copying over correctly, ive just checked and its because ive run out of space as its a load of videos and a flash player etc. (and I have them on there twice as I cant acces my USB stick from XDSL for some reason?)

So, is there anyway of changing the htdocs directory to my CD drive or even better my USB stick? Ive not been able to even acces my USB stick yet mind.

Thanks!!

EDIT: Found out it was the running out of space problem
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2010 Invision Power Services, Inc.