Unfortunately no one can be told what fun_plug is - you have to see it for yourself.
You are not logged in.
I am currently run my web server using the 8080 port successfully.
I want to change to port 80. My try to follow strickly from the wiki
http://dns323.kood.org/howto:lighttpd_p … r_lighttpd
I did change the folder name of fun_plug.d to ffp since I ffp appear on my Volume_1
I copied the edited lighttpd.sh and admwebs.sh into mt ffp/start
Then I:
chmod a+x lighttpd.sh.
chmod a+x admwebs.sh
Then I try to execute the lighttpd.sh using:
sh lighttpd.sh start
Then this error message appears:
root@nashawa:/mnt/HD_a2# sh lighttpd.sh start : not found: line 18: : not found: line 20: : not found: line 25: lighttpd.sh: line 52: syntax error: word unexpected (expecting "in") root@nashawa:/mnt/HD_a2#
What I am supposed to do now? If there any better guide on this?
Offline
Post a copy of your lighttpd.sh. The line 52 error is probably because you forgot to put "in" after the case statement, or you forgat to close a set of quotation marks somewhere and this is where it is regestering the error. The next thing is that I do not see the variables VOL1, SBINDIR, and ECTDIR defined anywhere. That may be why you are getting not found errors, because the path you are calling cannot be found. Anyway, post your script and then people can take a look at it.
Offline
I am using Notepad++ for editing the lighttpd.sh script
I went to Line 52:
case "$1" in
I am newbie actually :-)
What I am supposed to replace for the VOL1, SBINDIR and ETCDIR...
is it like this:
VOL1--->
mnt/HD_a2
SBBIN--->
mnt/HD_a2/lnx_bin
or
mnt/HD_a2/ffp/bin
ETCDIR--->
mnt/HD_a2/ffp/etc
Anyway here is my edited lighttpd.sh.
Offline
iazmin wrote:
I am using Notepad++ for editing the lighttpd.sh script
I had a look at your file. The context of the case statement seems fine. I did however notice that each line ends with a CR & LF. FUN_PLUG files are UNIX based and thus must not contain the CR.
Did you set line endings in the Settings/Preferences/New Document to UNIX? Notepad++ 5.03 has an edit function to convert files formatted as Windows to UNIX; Format/Convert to UNIX format. Change the files format, save it and try again.
Last edited by rcblackwell (2008-09-10 14:36:23)
Offline
rcblackwell wrote:
iazmin wrote:
I am using Notepad++ for editing the lighttpd.sh script
I had a look at your file. The context of the case statement seems fine. I did however notice that each line ends with a CR & LF. FUN_PLUG files are UNIX based and thus must not contain the CR.
Did you set line endings in the Settings/Preferences/New Document to UNIX? Notepad++ 5.03 has an edit function to convert files formatted as Windows to UNIX; Format/Convert to UNIX format. Change the files format, save it and try again.
You are right, I did not do that, will try again, may be this time using nano right in the command line.
By the way may you explain what is end of line CR & LF? I totally ignorant about these jargons....sorry bro
Last edited by iazmin (2008-09-10 16:51:37)
Offline
I solved my problem, but not using the above method since I realized I am using fun_plug v0.5 which should be using the method here:
http://dns323.kood.org/howto:ffp#lighttpd_web_server
I actually had try something similar to this from this guide:
http://www.nas-tweak.net/CH3SNAS:Tutorials/lighttpd
but the later skip one of the key step which is to reconfigure the lighttpd.conf in ffp/etc by adding these:
cd /ffp/etc sed -i '/server.port/ s/^/#/' lighttpd.conf cd /ffp/start chmod a+x kickwebs.sh lighttpd.sh
Once I applied the above codes and then restart the lighttpd.sh, my DNS323 now can run as a perfect web server at the native port 80 with the admin web run on port 81.
Without the above codes, lighttpd.conf is confused before you force it to be in port 81 but the conf file still using 8080
Offline
CR is "Carrige Return" and LF is "Line Feed". CR is the equivelant on a type writer to sliding the carrige back to the starting point at the end of a line and LF is the equivelant to advancing the paper by 1 line. CR + LF is equivelant to doing both, which is what the shiny metal bar on the typewriter did.
Offline