The ModMyTM Family of Sites:
ModMyMotoModMyiModMyGphone




 
 
Register or Connect with Facebook

Discuss AppStore Apps | Browse / Search Cydia | MMi Cydia Stats




  Apple Forums & iPhone Forums, Mods, Hacks, News, Themes, Downloads, and more! | ModMyi.com > 3rd Party Apps For iPhone | iPod Touch > Native iPhone / iPod Touch App Discussion
Reply
 
LinkBack Thread Tools Display Modes
  #31  
Old 09-05-2008, 10:47 AM
What's Jailbreak?
 
Join Date: Sep 2008
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts

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
Digg StumbleUpon Delicious Reddit Newsvine Google Yahoo Thanks Reply With Quote
  #32  
Old 09-08-2008, 09:58 AM
What's Jailbreak?
 
Join Date: Sep 2008
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts

no one can help?
Digg StumbleUpon Delicious Reddit Newsvine Google Yahoo Thanks Reply With Quote
  #33  
Old 09-08-2008, 10:28 AM
What's Jailbreak?
 
Join Date: Sep 2008
Device + Firmware: Iphone 3G 2.01
Operating System: Windows Vista
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts

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.
Digg StumbleUpon Delicious Reddit Newsvine Google Yahoo Thanks Reply With Quote
  #34  
Old 09-08-2008, 11:50 AM
What's Jailbreak?
 
Join Date: Sep 2008
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts

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

hope someone can help us soon!
Digg StumbleUpon Delicious Reddit Newsvine Google Yahoo Thanks Reply With Quote
  #35  
Old 09-08-2008, 05:36 PM
What's Jailbreak?
 
Join Date: Oct 2007
Posts: 20
Thanks: 4
Thanked 1 Time 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
Digg StumbleUpon Delicious Reddit Newsvine Google Yahoo Thanks Reply With Quote
  #36  
Old 09-09-2008, 02:02 AM
What's Jailbreak?
 
Join Date: Sep 2008
Device + Firmware: Iphone 3G 2.01
Operating System: Windows Vista
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts

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.
Digg StumbleUpon Delicious Reddit Newsvine Google Yahoo Thanks Reply With Quote
  #37  
Old 09-09-2008, 10:55 AM
What's Jailbreak?
 
Join Date: Sep 2008
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts

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.
Digg StumbleUpon Delicious Reddit Newsvine Google Yahoo Thanks Reply With Quote
  #38  
Old 09-09-2008, 11:23 AM
What's Jailbreak?
 
Join Date: Sep 2008
Device + Firmware: Iphone 3G 2.01
Operating System: Windows Vista
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts

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.
Digg StumbleUpon Delicious Reddit Newsvine Google Yahoo Thanks Reply With Quote
  #39  
Old 09-09-2008, 04:42 PM
What's Jailbreak?
 
Join Date: Oct 2007
Posts: 20
Thanks: 4
Thanked 1 Time 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:

Quote:
Interl error - server connection terminated

Click the image to open in full size.

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
Digg StumbleUpon Delicious Reddit Newsvine Google Yahoo Thanks Reply With Quote
  #40  
Old 09-10-2008, 07:15 AM
What's Jailbreak?
 
Join Date: Sep 2008
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts

change ur 127.0.0.1 to localhost.

works for me
Digg StumbleUpon Delicious Reddit Newsvine Google Yahoo Thanks Reply With Quote
  #41  
Old 09-11-2008, 04:46 AM
What's Jailbreak?
 
Join Date: Oct 2007
Posts: 20
Thanks: 4
Thanked 1 Time 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.
Digg StumbleUpon Delicious Reddit Newsvine Google Yahoo Thanks Reply With Quote
  #42  
Old 10-01-2008, 12:53 AM
What's Jailbreak?
 
Join Date: Oct 2008
Device + Firmware: iPhone 3G iPodTouch 1G
Operating System: OS X 10.5.5
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?
Digg StumbleUpon Delicious Reddit Newsvine Google Yahoo Thanks Reply With Quote
  #43  
Old 10-07-2008, 04:25 PM
Xandu's Avatar
Green Apple
 
Join Date: Dec 2007
Posts: 84
Thanks: 4
Thanked 3 Times in 3 Posts

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

Solution?

Last edited by Xandu; 10-07-2008 at 04:27 PM.. Reason: Automerged Doublepost
Digg StumbleUpon Delicious Reddit Newsvine Google Yahoo Thanks Reply With Quote
  #44  
Old 03-01-2009, 09:34 PM
Green Apple
 
Join Date: Sep 2007
Posts: 44
Thanks: 2
Thanked 1 Time in 1 Post
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
Digg StumbleUpon Delicious Reddit Newsvine Google Yahoo Thanks Reply With Quote
The Following User Says Thank You to joejoe123 For This Useful Post:
RuBBa_cHiKiN (07-16-2009)
  #45  
Old 03-01-2009, 09:35 PM
Broomhead's Avatar
Super Moderator
 
Join Date: Sep 2007
Device + Firmware: 2G-3.0|3G-3.1
Operating System: OS X 10.5.8
Location: The Windy City
Posts: 8,262
Thanks: 183
Thanked 608 Times in 538 Posts
Send a message via AIM to Broomhead

^^^
Digg StumbleUpon Delicious Reddit Newsvine Google Yahoo Thanks Reply With Quote
Reply

  Apple Forums & iPhone Forums, Mods, Hacks, News, Themes, Downloads, and more! | ModMyi.com > 3rd Party Apps For iPhone | iPod Touch > Native iPhone / iPod Touch App Discussion

Thread Tools
Display Modes

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are On



Go to Top
ModMyI

All times are GMT -6. The time now is 07:36 AM. Powered by vBulletin® Version 3.8.4
If you need Dedicated Server Hosting, you should check out SingleHop. | Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.3.0 Copyright © 2007-09 by ModMy, LLC. All rights reserved.

iPhone News / iPhone Forums / Apple News / Apple Forums / RSS / Contact Us / / Top