HOW TO USE lighttpd ????

Discussion in 'iPod touch Firmware 2.X Jailbreak' started by mastermax, Aug 1, 2008.

  1. mastermax

    mastermax New Member

    Joined:
    May 18, 2008
    Messages:
    10
    Likes Received:
    0
    lighttpd is the only server app for FW 2.0 . I downloaded it from Cydia but it doesn't work

    Please Register or Log in to view images

    I searched everywhere but I couldn't find anything. PLEASE HELP ME
  2. jdawson

    jdawson New Member

    Joined:
    Feb 1, 2008
    Messages:
    35
    Likes Received:
    0
    Ok I have it working but I am far from an expert...

    You need to have SSH on the device so you have a way to upload HTML files and put lighttpd.conf file on the device.

    You need to make a lighttpd.conf file on the device in any place of your choice.
    In the file you need to put this
    "
    dir-listing.activate = "enable" <- This allows you to browse directories if you don't want this don't add this!

    server.document-root = "/private/var/root/Cache" <-This has to be the place you put your html files.

    server.port = 80 <- Or what ever port number you like
    "

    Now I will state the OBVIOUS here but don't put the "<- message" stuff I put above that was just for your benifit to know what the lines do.

    Once you have made that file login via SSH and go.

    "lighttpd -f lighttpd.conf"

    Now if lighttpd.conf is not in the directory your in when you type the command then you better type in the full path to the file.

    If you reboot the device/restart the iphone or ipod touch you will have to SSH in again and re start it.
    This is why I would recomend you install terminal on your device so if your away from home and reboot your device you can manually re-start it. I know of no way to have it re-start on it's own on a reboot of the device.

    I would also recomend you put the "lighttpd -f lighttpd.conf" command in a text file called x.sh then when you reconnect you can run that scrip file by just typing "sh x.sh" and it will run.

    Hope this helps... If you look up on lighttpd.conf you will see a lot more complex files can be made with access control to directories and such.

    Good luck.
  3. MegaMan

    MegaMan New Member

    Joined:
    Sep 16, 2007
    Messages:
    877
    Likes Received:
    2
    why would you want to run a web server on an ipod

    Please Register or Log in to view images


    it has 400mhz and your running through wifi
  4. mastermax

    mastermax New Member

    Joined:
    May 18, 2008
    Messages:
    10
    Likes Received:
    0
    It says "XX permission denied" what ever port I use

    Please Register or Log in to view images


    ------------------double post merged------------------
    OK. server.port = 5020 worked but safari still doesn't find the server on http://127.0.0.1

    Please Register or Log in to view images

    Please Register or Log in to view images


    ------------------double post merged------------------
    OK THANK YOU SO MUCH it is working.

    (added :5020)
  5. geiman

    geiman New Member

    Joined:
    Nov 27, 2007
    Messages:
    47
    Likes Received:
    0
    Device:
    iPod touch
    It's a great way to read pdf's, ebooks, etc.
  6. jdawson

    jdawson New Member

    Joined:
    Feb 1, 2008
    Messages:
    35
    Likes Received:
    0
    I use it with a few porgrams like a geocaching database I have that generates a bunch of HTML pages that show you information about geocaches. Then i can access them all when i am away from a wifi network.
  7. chronography

    chronography New Member

    Joined:
    Mar 13, 2009
    Messages:
    4
    Likes Received:
    0
    eror

    I am getting an error when I test the conf file.

    XX:~mobile$ lighttpd -f lighttpd.conf 2009-06-13 03:45:04 (configfile.c.855) source: lighttpd.conf line: 1 pos: 32 parser failed somehow near here: dir-listing.activate


    Same with x.sh
  8. ZhiZhi778

    ZhiZhi778 Member

    Joined:
    Jan 20, 2008
    Messages:
    936
    Likes Received:
    2
    Device:
    iPhone 3G (Black)
    read that guide and you're done:
    http://streamer.rit.edu/~jeffs/development/iPhone/webserver.html

    to the "sense" question:
    a home-webserver is nice and I'm using my old ipod touch 1g for that:

    since things like keepawake or insomnia aren't working out too well I have to leave the screen on all the time.

    with that configuration I can do filesharing between the local network computers (now there aren't any OS problems anymore) and I can test websites, build a home-webserver
    and last but not least upload videos from any point and stream/share it with anyone who's in the network (for example friends)
  9. ElectricMan5

    ElectricMan5 New Member

    Joined:
    Jun 12, 2008
    Messages:
    138
    Likes Received:
    0
    Wouldn't that kill your ipod though? I use it as a webserver at school instead of a flash drive, but wouldn't just leaving it on, even plugged in, kill the battery and the internal stuff?
  10. ZhiZhi778

    ZhiZhi778 Member

    Joined:
    Jan 20, 2008
    Messages:
    936
    Likes Received:
    2
    Device:
    iPhone 3G (Black)
    no, it won't - the hardware is designed for excessive use - the only problem could be the LCD but nothing else

    sure, every device will reach its end of life so the ipod will and leaving it on all day will speed up this process but well - I don't think I bought this ipod for life =D

Share This Page