Page 2 of 3 FirstFirst 123 LastLast
Results 21 to 40 of 49

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


Thread: Setting up lighttpd web server on 2.0

  1. #21
    Quote Originally Posted by eosjack View Post
    I'm getting the same error message that danc is seeing. lighttpd runs fine by itself, but loading the plist fails with:
    I don't have a clue. I'm on 2.0.1 iPod and it works fine here. I get the same working results from both the Terminal app on the device and ssh from laptop.

  2. #22
    Quote Originally Posted by eosjack View Post
    I'm getting the same error message that danc is seeing. lighttpd runs fine by itself, but loading the plist fails with:
    Try the old plist:

    HTML Code:
    <dict>
    	<key>Label</key>
    	<string>com.amcgregor.lighttpd</string>
    	<key>OnDemand</key>
    	<false/>
    	<key>ProgramArguments</key>
    	<array>
    		<string>/usr/sbin/lighttpd</string>
    		<string>-f/usr/local/etc/lighttpd.conf</string>
    		<string>-D</string>
    	</array>
    	<key>StandardErrorPath</key>
    	<string>/dev/null</string>
    </dict>

    Modify your config and plist name
    Last edited by bmxtreme; 08-15-2008 at 10:03 PM.

  3. #23
    I tried the old plist, and I got the same error. I'm not sure it's actually an issue though. Lighttpd is loading at startup and so far everything seems to be working ok.

  4. #24
    Hi, this is great. Thanks to the guide here, I got it to work on my local wireless network. But have anyone had luck using it on the AT&T network? http to the ip address from AT&T but it does not work that way. Dose AT&T block port 80?
    Last edited by mightyPhone; 08-24-2008 at 09:20 AM.

  5. #25
    re: access forbidden

    When I looked at the .conf file, I thought what's with "/private/var/mobile/Sites/"? And promptly changed it to "/var/mobile/Sites/".

    I got the 403 Access Forbidden mentioned above until I changed it back, even with the appropriate permissions. It seems like the two directories are sim-linked to each other... but something else is up.

    Anyone know why the /var/mobile/Sites/ didn't work?

    Thanks,
    twinotter

  6. #26
    Has anyone gotten start/stopping with bossprefs? Hmm i tried loading and unloading the loadctl way and it didn't work.

    Starting it manually /usr/sbin/lighttpd -f /usr/etc/lighttpd.conf doesn't work either, although it works in SSH / MobileTerminal

    So i made a script for BossPrefs to run,

    Code:
    /usr/sbin/lighttpd -f /usr/etc/lighttpd.conf
    echo "lol" > /var/mobile/test.log
    it definitely runs the script ok, since test.log contains "lol"

    but it JUST doesnt want to start lighttpd! Anyone help?

  7. #27
    so... you can't actually PLAY files like mpg/avi with this though right?

  8. #28
    Dear friends. I am using an iphone 3g with firmware 2.0.1. I have done everything as xogen said in his first post. I have done all the files and folders. I gave the correct permissions to the document root (755). I also run chown nobody to the document root (so that the user the webserver is running to have access to the folder.All I get when I point safari to http:// 127.0.0.1] or http:// localhost all I get is 403 - Forbidden. Please help anyone!!
    Last edited by sotoskawasaki; 09-02-2008 at 08:53 PM. Reason: Automerged Doublepost

  9. #29
    If you want the webserver to have access to a folder, it must have access to every folder in it's path. ex: /private/var/mobile/Sites

    If I chmod 755 /private/var/mobile/Sites then the webserver has access to Sites but I didn't give it access to mobile so it can't access the folder.

    If I give you a key to my apartment but not my apartment building, how are you supposed to get in?

  10. #30
    I did that too ... Again nothing changed....All I get is 403 - Forbidden. Anyway I notice that the chgroup nogroup command doesnt work. The default group is mobile. I tried to change the group in lighttpd.conf to mobile but again it didnt work.

    Edit: I must have done something wrong because I did it again and it works now. Thanks!! And by the way does anyone knows a good tutorial on how to set up vsftp server on iphone?
    Last edited by sotoskawasaki; 09-04-2008 at 12:47 AM.

  11. #31
    hi i don really understand the guide. would need help! im using a 2g iphone with 2.0.2 firmware

    First I had to create a configuration file. I placed this here: /usr/etc/lighttpd.conf and it looks like this:

    Create the conf file with notepad? i just change the extension to .conf will do?
    There doesn seem to be a path of usr/etc. So do i create 1 myself?




    This is a simple configuration and you will want to review it. Change this line:

    Code:server.document-root = "/private/var/mobile/Sites/"

    i dont get this part. what am i suppose to change?


    to reflect the location of your documents. You will also need to create the folder:

    Code:# mkdir /var/log/lighttpd

    and change the folders ownership to user nobody:

    Code:# chown nobody:nobody /var/log/lighttpd

    in this part im just suppose to add a new folder and change the permission? can iphone pc suite does that? or i need some other program?

    Then I loaded it with the command:
    Code:# launchctl load -w /Library/LaunchDaemons/com.http.lighttpd.plist

    eh how do i load the command?? am i suppose to have terminal?

    Thanks. but i hope to get a more layman guide! haha

  12. #32
    no one can help?

  13. #33
    I'm having similar problems celestial.
    I assumed I had to create a directory /usr/etc to put the lightpad.conf file into as this directory did not exist for me either. There is a usr/local/etc directory on my phone though, so its a bit confusing.

    I simply copied the conf text from the XOGEN posting and pasted it into a text editor and saved it as lighttpd.conf and then copied that into usr/etc directory.

    when I enter the command using wincp in SSH mode:
    launchctl load -w /Library/LaunchDaemons/com.http.lighttpd.plist
    I get no errors, but then when I try to direct safari browser to cPanel® I always get the error "Safari Can't Open the page because it can't find the server"

    Does this mean then that lighttpd is not actually running? What does this error indicate?

    Thanks for any help also any of you code gurus might have.

    Cheers.

  14. #34
    lol im glad im not the one thats not smart to get it up haha.

    hope someone can help us soon!

  15. #35
    What's Jailbreak?
    Join Date
    Oct 2007
    Posts
    20
    Thanks
    4
    Thanked 2 Times in 1 Post
    Quote Originally Posted by celestial517 View Post
    hi i don really understand the guide. would need help! im using a 2g iphone with 2.0.2 firmware

    First I had to create a configuration file. I placed this here: /usr/etc/lighttpd.conf and it looks like this:

    Create the conf file with notepad? i just change the extension to .conf will do?
    There doesn seem to be a path of usr/etc. So do i create 1 myself?




    This is a simple configuration and you will want to review it. Change this line:

    Code:server.document-root = "/private/var/mobile/Sites/"

    i dont get this part. what am i suppose to change?


    to reflect the location of your documents. You will also need to create the folder:

    Code:# mkdir /var/log/lighttpd

    and change the folders ownership to user nobody:

    Code:# chown nobody:nobody /var/log/lighttpd

    in this part im just suppose to add a new folder and change the permission? can iphone pc suite does that? or i need some other program?

    Then I loaded it with the command:
    Code:# launchctl load -w /Library/LaunchDaemons/com.http.lighttpd.plist

    eh how do i load the command?? am i suppose to have terminal?

    Thanks. but i hope to get a more layman guide! haha
    First of all, install OpenSSH from Cydia and reboot.
    1. Yes create folder /usr/etc/ yourself
    2. Yes change the extension to .conf (lighttpd.conf)
    3. This is a simple configuration and you will want to review it. Change this line:

    Code:server.document-root = "/private/var/mobile/Sites/"


    In the lighttpd.conf file there is a line /private/var/mobile/Sites/ and you can rename that line to refelect where you want to store your websites. (I didn't rename it and left it alone).

    4. You can create new folders using any FTP client that supports SFTP or you can just do it through the terminal. Download MobileTerminal from Cydia or Installer and type:

    Code:
    SU
    And type the password, the default is alpine to get root level access. Then type

    Code:
    chown nobody:nobody /var/log/lighttpd
    After applying all changes reboot iPhone
    Last edited by gonano; 09-08-2008 at 05:36 PM. Reason: Automerged Doublepost

  16. #36
    thanx gonano

    I have done all that but I still can not get the server to run I continue to get the server not found error.... Very Frustrating.

  17. #37
    i finally got it working....

    here are the steps.

    First I had to create a configuration file. I placed this here: /usr/etc/lighttpd.conf and it looks like this:

    [I used the codes from madlogik]

    Make a new directory in private/var/log/lighttpd [i dint change any ownership or whatever]

    Next is create the plist and save as com.http.lighttpd.plist
    then drop the plist into /Library/LaunchDaemons/

    restarted my iphone. and point my browser to cPanel®

    And thats it. got it working.

  18. #38
    I uninstalled lighttpd, and reinstalled again and then another reboot and finally now it works. I left everything unchanged, so I guess it was just a bad install. Thanks for everyones suggestions.

  19. #39
    What's Jailbreak?
    Join Date
    Oct 2007
    Posts
    20
    Thanks
    4
    Thanked 2 Times in 1 Post
    I followed this tutorial and everything works great except one little thing.

    Using 127.0.0.1 in Safari only works when connected to Wi-Fi.
    If I'm not connected to Wi-Fi I get this error:

    Interl error - server connection terminated



    Any idea on how to fix this?

    Is everyone experiencing this when not connected to Wi-Fi?
    Last edited by gonano; 09-09-2008 at 04:46 PM. Reason: Question for all

  20. #40
    change ur 127.0.0.1 to localhost.

    works for me

Page 2 of 3 FirstFirst 123 LastLast
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •