+ Reply
Page 3 of 3 FirstFirst 123
Results 41 to 49 of 49

Your favorite Apple, iPhone, iPad, iOS, Jailbreak, and Cydia site.


Thread: Setting up lighttpd web server on 2.0

is a discussion within the

Native iPhone / iPod Touch App Discussion

forums, a part of the

3rd Party Apps For iPhone | iPod Touch

section;
Thanks Celestial517 but that can't work because to use localhost you need to be connected to a network. Either local network or Internet, this does not include Edge. The benefit
...
  1. #41
    What's Jailbreak?
    Join Date
    Oct 2007
    Posts
    20
    Thanks
    4
    Thanked 2 Times in 1 Post
    Thanks Celestial517 but that can't work because to use localhost you need to be connected to a network. Either local network or Internet, this does not include Edge. The benefit of using 127.0.0.1 is you can use it anywhere when you're on the go. But for me 127.0.0.1 only works when I'm connected to a network.

  2. #42
    What's Jailbreak?
    Join Date
    Sep 2008
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    I am trying XOGEN's method and I created the directory to match his "lighttpd.conf" doc, but I get a 404 error, file not found. I tried both localhost and 127.0.0.1. I also tried to use a different directory and modified the "lighttpd.conf" file accordingly, but still getting the same error. I am using an iPodTouch, 1st Gen and 2.1 software that has been jailbroken. Any ideas?

  3. #43
    Green Apple Xandu's Avatar
    Join Date
    Dec 2007
    Posts
    99
    Thanks
    4
    Thanked 5 Times in 4 Posts

    Safari could not open this page because the server was not found.

    Solution?
    Last edited by Xandu; 10-07-2008 at 03:27 PM. Reason: Automerged Doublepost


  4. #44
    Green Apple
    Join Date
    Sep 2007
    Posts
    45
    Thanks
    2
    Thanked 1 Time in 1 Post
    Default lighttpd with PHP on IPhoneOS 2.2
    I started to think of the time back in 1.1.4 when I had apache with PHP running and decided to look around to find out if it was still possible to run a webserver with PHP.

    Using the work here I made some updates and found this as a way to get what I want. (I assume everyone has knowledge of SSH if not pm me and I will try to help)

    First go to Cydia and Download and Install "lighttpd", "PHP: Hypertext Preprocessor", and "BossPrefs"

    Sources:
    "lighttpd" and "php" is from Saurik Repo - "http://apt.saurik.com/"
    "BossPrefs" is from Bigboss reop - "http://apt.bigboss.us.com/repofiles/cydia/"

    Once All is downloaded you need to create a configuration file, a launchdaemon, and a startup/shutdown service in bigboss to turn on and off.

    Step 1: Configuration File
    Connect to SSH and create directory
    /usr/etc
    Upload lighttpd.conf with premissions (wheel:root 777)

    Send big files the easy way. Files too large for email attachments? No problem!

    For those of you out there that have made lighttpd conf files in the past this line is what allowed me to use PHP
    (see below which allowed for the PHP)
    "
    fastcgi.server = ( ".php" => ((
    "bin-path" => "/usr/bin/php-cgi",
    "socket" => "/tmp/php.socket"
    )))
    "

    Step 2: Launchdaemon
    Download the following File - PLIST
    Send big files the easy way. Files too large for email attachments? No problem!

    IF you are like me and want to only start the webserver when you want by using bosspref, then put the above file into directory
    /Applications/BossPrefs.app/scripts
    file should have permissions (wheel:root 644)


    Step 3: BossPrefs
    Download the following Files
    Send big files the easy way. Files too large for email attachments? No problem!

    Put the following above files into these locations
    /Applications/BossPrefs.app/scripts
    lighttpdoff.sh (wheel:root 775)
    lighttpdon.sh (wheel:root 775)

    /Applications/BossPrefs.app/services
    Lighttpd (wheel:root 644)


    TIme to test:
    Here is a heads or tails php app i made.
    Send big files the easy way. Files too large for email attachments? No problem!
    Make Directory
    /var/mobile/Sites
    Put these Files in folder

    Finally reboot, switch your BossPref to on, and then try out my php file in your new webserver.
    Open Safari
    type
    http://127.0.0.1/heads_or_tails.php

    For backup I put all files on another site
    Free File Hosting Made Simple - MediaFire

  5. The Following User Says Thank You to joejoe123 For This Useful Post:

    RuBBa_cHiKiN (07-16-2009)

  6. #45
    Moderator Admin Broomhead's Avatar
    Join Date
    Sep 2007
    Location
    Outside Chicago IL
    Posts
    17,150
    Thanks
    502
    Thanked 1,718 Times in 1,171 Posts

    ^^^

  7. #46
    What's Jailbreak?
    Join Date
    Aug 2008
    Posts
    19
    Thanks
    2
    Thanked 1 Time in 1 Post
    Just thought I should mention that in the conf file under server.modules one needs to add "mod_fastcgi",

    server.modules = ( "mod_expire",
    "mod_fastcgi",
    "mod_auth",
    "mod_access",
    "mod_evasive",
    "mod_compress",
    "mod_status",
    "mod_redirect",
    "mod_accesslog" )

    and in mimetype.assign add ".php" => "text/php",

  8. The Following User Says Thank You to mightyPhone For This Useful Post:

    joejoe123 (03-02-2009)

  9. #47
    Green Apple
    Join Date
    Sep 2007
    Posts
    45
    Thanks
    2
    Thanked 1 Time in 1 Post
    thanks mightyPhone good add

  10. #48
    My iPhone is a Part of Me lightmaster's Avatar
    Join Date
    Jan 2008
    Location
    Georgia
    Posts
    589
    Thanks
    174
    Thanked 165 Times in 112 Posts

    Anyone know why when I go to http://127.0.0.1 on my iTouch, I get "404 - Not Found" but when I go to http://my-iTouchs-ip from my Macbook it works fine and shows me my index.html file?
    Last edited by lightmaster; 03-14-2009 at 08:07 PM.
    "In computer networking, a Media Access Control address (MAC address) is a unique identifier assigned to most network adapters or network interface cards (NICs) by the manufacturer for identification, and used in the Media Access Control protocol sub-layer." (1)

    "The Macintosh, or Mac, is a series of several lines of personal computers designed, developed, and marketed by Apple Inc." (2)



  11. #49
    What's Jailbreak? RuBBa_cHiKiN's Avatar
    Join Date
    May 2009
    Posts
    5
    Thanks
    1
    Thanked 1 Time in 1 Post
    Quote Originally Posted by Broomhead View Post
    ^^^
    +1

    Worked perfectly!

    UPDATE: Err, after I turn it back off in BossPrefs, I can't restart it. Even after rebooting, it didn't work the second time.

    SECOND UPDATE: Now it doesn't even work after stripping everything out, rebooting, putting everything back in, and rebooting again.
    Last edited by RuBBa_cHiKiN; 07-16-2009 at 04:13 AM.

+ Reply
Page 3 of 3 FirstFirst 123

LinkBacks (?)


Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts