-
08-15-2008, 10:10 AM #21
-
08-15-2008, 10:01 PM #22
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 nameLast edited by bmxtreme; 08-15-2008 at 10:03 PM.
-
08-18-2008, 01:08 AM #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.
-
08-24-2008, 09:15 AM #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.
-
08-27-2008, 01:17 PM #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
-
08-27-2008, 08:39 PM #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,
it definitely runs the script ok, since test.log contains "lol"Code:/usr/sbin/lighttpd -f /usr/etc/lighttpd.conf echo "lol" > /var/mobile/test.log
but it JUST doesnt want to start lighttpd! Anyone help?
-
08-28-2008, 01:57 AM #27
so... you can't actually PLAY files like mpg/avi with this though right?
-
09-02-2008, 08:51 PM #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
-
09-03-2008, 06:35 PM #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?
-
09-04-2008, 12:33 AM #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.
-
09-05-2008, 10:47 AM #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
-
09-08-2008, 09:58 AM #32
no one can help?
-
09-08-2008, 10:28 AM #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.
-
09-08-2008, 11:50 AM #34
lol im glad im not the one thats not smart to get it up haha.
hope someone can help us soon!
-
09-08-2008, 05:36 PM #35
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:
And type the password, the default is alpine to get root level access. Then typeCode:SU
After applying all changes reboot iPhoneCode:chown nobody:nobody /var/log/lighttpd
Last edited by gonano; 09-08-2008 at 05:36 PM. Reason: Automerged Doublepost
-
09-09-2008, 02:02 AM #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.
-
09-09-2008, 10:55 AM #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.
-
09-09-2008, 11:23 AM #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.
-
09-09-2008, 04:42 PM #39
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
-
09-10-2008, 07:15 AM #40
change ur 127.0.0.1 to localhost.
works for me



LinkBack URL
About LinkBacks
Reply With Quote