Bekijk de volledige versie : Webserver
Michael@Home
21-12-2006, 19:38
Is it possible to get ASP running on the WL700gE? I guess I have to set up a virtual directory, but it is not a regular setup option. I saw the discussions about the firmware modding, and how can I get a virtual directory working? I'm not Linux-educated :rolleyes: , so how can I edit the package succesfully on a windows machine? I have the GPL_WL700gE_1046.zip downloaded from Asus. By the way, for who didn't notice, the setup pages are ASP as well, so I presume that there must be running some ASP server...
Greets,
Michael
The best way would be for you to install one of the custom firmware images - I would recommend kfurge's one - then you can set a webserver to run on startup (I believe its /apps/binthttpd on the router - which supports activescripting) If you get stuck, just post back here and I'm sure somebody will help you out :)
Michael@Home
22-12-2006, 14:22
Thanks D3viant,
I'll check it out in time, first have to get a computer running on some linux, and then have to autodidact myself ;)
Greets,
Michael
Thanks D3viant,
I'll check it out in time, first have to get a computer running on some linux, and then have to autodidact myself ;)
Greets,
Michael
If you want a quick and easy way to get a version of Linux running, without having necessarily to get a different PC, try getting a KNOPPIX CD (or DVD if you want a very complete system).
This CD or DVD does not require installation itself, and it will boot a stock-standard Windows PC to Linux (Debian Etch) without affecting the Windows install in any way.
All that is required is to download the .iso file and then use that as a CD(or DVD) image file to create the bootable CD(or DVD).
http://distrowatch.com/?newsid=03938#0
I can't get ASP to work with thttpd (or lighttpd), it just shows a list of files.
I start my server with
thttpd -dd /www/English -u root -p 8085 -i /var/run/thttpd.pid
I don't know if there are other parameters needed.
any ideas?
/regards
Henrik
hmm I got the webserver to work now with:
httpd 8081 /www/English
but two things:
1. I cannot start the httpd server from rc.local but only when I login and type the command manually, how to fix this?
2. I cannot kill the original httpd process. It keeps starting over and over again. I would like to have another server on port 80
/regards
Henrik
1. I cannot start the httpd server from rc.local but only when I login and type the command manually, how to fix this?
Maybe it's also a LD_LIBRARY_PATH problem (I'm beginning to sound like a broken record... ;-) ). Try adding /apps/lib and see what happens. Like you did before, be sure to fully specify the path to httpd.
2. I cannot kill the original httpd process. It keeps starting over and over again. I would like to have another server on port 80
I believe watchdog is your culprit. From reading the 1.0.4.2 source code, I believe it regularly pings the internal web server and if it's not there, watchdog will restart it. To make watchdog completely go away, you'll have to "kill -9" it.
- K.C.
watch dog is already killed with 'killall -q -9 watchdog', and adding the '/apps/lib' is not helping :( I'm already linking to the full path.
httpd is instantly starting when manually try to kill it. (kill -9 PID)
/regards
Henrik
Interesting. I'll experiment here a little bit this weekend.
- K.C.
I have lighttpd, php, xmail and phpxmail running. It works perfect.
Sollie.
sollie: do user mailboxes display correctly for you in phpxmail?
for me that just loads a blank page...
yep, but therefor i had to restart one time. And i downloaded phpxmail from cvs. version 1.5.
Sollie.
If you like we can talk on irc. I have xmail totaly running. Without errors. % minutes agoo i installed a php webmail script. All went perfecet. The script doesnt require php-pop or php-imap modules and no mysql.
Perfect i think.
Sollie.
PS: http://www.uebimiau.org/
hmm, still no luck for me with the version 1.5 CVS. Now it won't even let me logon as the server admin!
Are you running your phpxmail on lighttpd? I couldn't get it running there - I got an access denied error when trying to browse to the phpxmail location...
did you enable php in your lighttpd.conf. And did you install php.
Sollie.
Ps: yes i use lighttpd
It appeared to be enabled in the default conf - .php files were set to be recognised as applications to be executed (unless I missed something)
My internet at home is on the fritz since the bad weather in the UK yesterday, hopefully it'll get fixed today so I can have a play with the http servers at the weekend...
Ok, lets go:
1: Install php (without editing php.ini, the default works fine)
ipkg install php
2: Install fast cgi
ipkg install php-fcgi
3: Install lighttpd
ipkg install lighttpd
4: Install file editor
ipkg install nano
5: Edit lighttpd.conf
nano /opt/etc/lighttpd/lighttpd.conf
5.1 Uncomment --->
"mod_fastcgi",
5.2 Use --->
server.document-root = "/opt/share/www/"
5.3 Change serverport to --->
server.port = 8082
5.4 Uncomment --->:
fastcgi.server = ( ".php" =>
( "localhost" =>
(
"socket" => "/tmp/php-fastcgi.socket",
"bin-path" => "/opt/bin/php-fcgi"
)
)
)
Dont forget to use /opt/bin/php-fcgi
6: Chmod www directory
chmod 777 /opt/share/www
7: Create a symlink to MYSHARE1
cd /shares/MYVOLUME1/MYSHARE1
ln -s /opt/share/www
Thats all,
Sollie.
Right, phpxmail 1.5 is now running again using lighttpd. but I still can't see the mailboxes within an existing domain - I can see the mailbox table section only if there are no users in the domain...
I had that also,
I rebooted the router and it was ok.
Sollie.
Ps: use this option in rc.local to start xmail.
/opt/etc/init.d/S43xmail start
I modded the file a little to enable logging in phpxmail and i read something on a optware forum:
#!/opt/bin/bash
#
# skeleton example file to build /etc/init.d/ scripts.
# This file should be used to construct scripts for /etc/init.d.
#
# Written by Miquel van Smoorenburg <miquels@cistron.nl>.
# Modified by Davide Libenzi <davidel@xmailserver.org>
#
# Version: @(#)skeleton 1.8 03-Mar-1998 miquels@cistron.nl
#
XMAIL_ROOT=/opt/var/MailRoot
#XMAIL_CMD_LINE="-SX 1 -Qn 1 -Yt 1 -Ln 1 -PX 1 -CX 1"
XMAIL_CMD_LINE="-Md -SX 1 -Qn 1 -Yt 1 -Ln 1 -PX 1 -CX 1 -Pl -Sl -Ql -L1"
PATH=$XMAIL_ROOT/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
DAEMON=/opt/bin/XMail NAME=XMail DESC="XMail server"
test -f $DAEMON || exit 0
set -e
ulimit -c 10000
start_xmail()
{
MAIL_ROOT=$XMAIL_ROOT
export MAIL_ROOT
MAIL_CMD_LINE=$XMAIL_CMD_LINE
export MAIL_CMD_LINE
$DAEMON $MAIL_CMD_LINE > /dev/null 2>&1 &
while [ ! -f /var/run/$NAME.pid ]
do
sleep 1
done
}
stop_xmail()
{
if [ -f /var/run/$NAME.pid ]
then
echo `date` > $XMAIL_ROOT/.shutdown
kill -INT `cat /var/run/$NAME.pid`
while [ -f $XMAIL_ROOT/.shutdown ]
do
sleep 1
done
fi
}
case "$1" in
start)
echo -n "Starting $DESC: "
start_xmail
echo "$NAME.[" `cat /var/run/$NAME.pid` "]"
;;
stop)
echo -n "Stopping $DESC: "
stop_xmail
echo "$NAME."
;;
#reload)
#
# If the daemon can reload its config files on the fly
# for example by sending it SIGHUP, do it here.
#
# If the daemon responds to changes in its config file
# directly anyway, make this a do-nothing entry.
#
# echo "Reloading $DESC configuration files."
# start-stop-daemon --stop --signal 1 --quiet --pidfile \
# /var/run/$NAME.pid --exec $DAEMON
#;;
restart|force-reload)
#
# If the "reload" option is implemented, move the "force-reload"
# option to the "reload" entry above. If not, "force-reload" is
# just the same as "restart".
#
echo -n "Restarting $DESC: "
stop_xmail
sleep 1
start_xmail
echo "$NAME.[" `cat /var/run/$NAME.pid` "]"
;;
*)
N=/etc/init.d/$NAME
# echo "Usage: $N {start|stop|restart|reload|force-reload}" >&2
echo "Usage: $N {start|stop|restart|force-reload}" >&2
exit 1
;;
esac
exit 0
Also use this in rc.local to start lighttpd at boot:
/opt/etc/init.d/S80lighttpd start
yup - thanks, I have the startup scripts in place
(kicking them all off at once with
for i in `ls /opt/etc/init.d/S*`; do $i start; done
)
I have modified /opt/var/MailRoot/xmail to get logging working. Still no luck with getting the user mailboxes to display though - it's a bit strange, the page takes awhile to load as if something is happening, but the mailbox entries never actually come up, the page just loads up with the sidebar and the links to other options for that domain.
did you use this one:
XMAIL_CMD_LINE="-Md -SX 1 -Qn 1 -Yt 1 -Ln 1 -PX 1 -CX 1 -Pl -Sl -Ql -L1"
-CX 1 -Pl -Sl -Ql -L1 --> logging
-Md --> I dont know, read about it My tests went ok with this line
There are two files to start xmail, i use only S43.
Sollie.
http://wl700g.info/showthread.php?p=44354
Thanks, that link got the logging going, I believe the S43xmail is a symbolic link to /opt/var/MailRoot/xmail, so there is only actually 1 startup file.
I still don't have individual users mailboxes displaying like they should, but I guess I can do without that feature...
Try:
ipkg update
After that:
ipkg upgrade
php is updated some days ago.
Sollie.
hmantsao
13-01-2007, 17:38
do anyone install mysql to route?
i am still try it ..:confused:
How about we all start asking questions in another thread, instead of using this one? ;)
/regards
Henrik
d3viant, update for logging:
-Pl -Sl -Ql -Yl -Fl -Cl -Ll
Sollie.
hmantsao
14-01-2007, 06:25
yes, i did. i can use mysql +php+lighttpd now but still try performance.
back2basic
14-01-2007, 09:45
yes, i did. i can use mysql +php+lighttpd now but still try performance.
can you tell us how you got mysql running on this awsome box?
Thxx :p
Sollie, I still think theres something wrong with my php/http config - it's all been updated to the latest versions. I still can't see users in a domain in phpxmail, and uebimiau refuses to load aswell. Both of those pages just sit there doing nothing, before just loading a blank page...
Sent me your conf files: "removed" (hehe)
Sollie.
That's the xmail address right :)
the lighttpd conf is send
hmantsao
14-01-2007, 17:02
can you tell us how you got mysql running on this awsome box?
Thxx :p
that is still have many problem, i need to try more times.
basically, installing lighttpd & php is don't have big problem but mysql still have problem. maybe you can try it fist.
install mysql.
1. ipkg install mysql :mad: then will show error messages
2. ln -s /opt/lib/mysql/libmysqlclient.so /opt/lib/libmysqlclient.so.14
3. modify /opt/etc/my.cnf
;password = your passwd -> password = root
4. copy database which name is mysql from anywhere we can to /opt/var/lib/mysql/mysql/* , i copy the database from "appsrv<-w32 program"
5. /opt/libexec/mysqld &
6 ipkg install phpmyadmin
7. modify /opt/share/www/phpmyadmin/config.inc.php to add password.
$cfg['Servers'][$i]['password'] = 'root'; // MySQL password (only
8. now , you can try mysql in command mod or use phpmyadmin (please check your httpd location)
9 and try to use :mad:
as i showing before that still have many problem , need to check why can't create mysql database and why can't start mysql from /opt/etc/init.d/S70mysqld.
Sollie, I still think theres something wrong with my php/http config - it's all been updated to the latest versions. I still can't see users in a domain in phpxmail, and uebimiau refuses to load aswell. Both of those pages just sit there doing nothing, before just loading a blank page...
Heh, weird, been playing round with openWRT on my router - this now works perfectly. I think I will attribute it to usual ASUS firmware randomness... :)
If you like we can talk on irc. I have xmail totaly running. Without errors. % minutes agoo i installed a php webmail script. All went perfecet. The script doesnt require php-pop or php-imap modules and no mysql.
Perfect i think.
Sollie.
PS: http://www.uebimiau.org/
Trying to get this going now I have phpxmail working properly (finally!)
I am now having errors with the uebimiau code - when I try to login with my username and password, it complains about
ERROR (2): Header may not contain more than a single header, new line detected. (webmail/inc/inc.php:156)
This file does indeed have a header that spans over 3 lines, but I can't see why this should affect the php... Any ideas?
Forget: http://www.uebimiau.org/
Use: http://www.telaen.org/
Sollie.
If you see this error in /webmail:
ERROR (2): Header may not contain more than a single header, new line detected. (/webmail/inc/inc.php:156)
edit /var/www/html/webmail/inc/inc.php.
Change :
Header("Expires: Wed, 11 Nov 1998 11:11:11 GMT\r\n".
"Cache-Control: no-cache\r\n".
"Cache-Control: must-revalidate");
to
Header("Expires: Wed, 11 Nov 1998 11:11:11 GMT");
Header("Cache-Control: no-cache");
Header("Cache-Control: must-revalidate");
Save, and exit.
PS: this is only for http://www.uebimiau.org/ users.
d3viant, i also have an enhanced-ctorrent gui running on lighttpd (php).
Sollie.
PS: its an beta version, but dood enough for now. http://www.nslu2-info.de/showthread.php?t=4515&page=9
Thanks sollie - telaen is working quite well for me - do you know of any way to speed up page serving for it though - it takes a few seconds for each page to load for me currently!
May get round to trying the enhanced-ctorrent GUI too - does it work better than the transmission cgi script?
I dont know how to speed up page serving. Maybe using a db-server like mysql.
May get round to trying the enhanced-ctorrent GUI too - does it work better than the transmission cgi script?
Its not working better right now. I hope it will in the near future (couple of weeks). I use it coz i want to use enhanced-ctorrent.
Sollie.
Hi All,
I'm getting great results using the custom firmware and especially mt-daapd,
but I'm having an issue running php - I've followed Sollie's instructions earlier in this thread, but when I try to start the lighttpd I get the following:
# /opt/etc/init.d/S80lighttpd start
Starting web server: lighttpd
#
# (mod_fastcgi.c.988) execve failed for: /opt/bin/php-fcgi
No such file or directory
(mod_fastcgi.c.1014) the fastcgi-backend /opt/bin/php-fcgi
failed to start:
(mod_fastcgi.c.1018) child exited with status 2 /opt/bin/php-fcgi
(mod_fastcgi.c.1021) if you try do run PHP as FastCGI backend make sure you use the FastCGI enabled version.
You can find out if it is the right one by executing 'php -v' and it should display '(cgi-fcgi)' in the output, NOT (cgi) NOR (cli)
For more information check http://www.lighttpd.net/documentation/fastcgi.html#preparing-php-as-a-fastcgi-program
(mod_fastcgi.c.1026) If this is PHP on Gentoo add fastcgi to the USE flags
(mod_fastcgi.c.1322) [ERROR]: spawning fcgi failed.
(server.c.848) Configuration of plugins failed. Going down.
If I re-comment out the php-fcgi part of lighttpd.conf the server starts ok.
I've tried creating /opt/bin/php-fcgi folder with 777 privs, but then I get the error:
# 2007-02-05 18:44:30: (mod_fastcgi.c.988) execve failed for: /opt/bin/php-fcgi
Permission denied
Obviously it's a permissions thing, but I'm new to linux and haven't really got a clue what I'm doing... :confused:
you have to install cgi support first,
1:
ipkg update
2:
ipkg upgrade
3:
ipkg install mod-fastcgi
Sollie.
Thanks Sollie, that certainly downloaded and installed some new bits and pieces - including apache it seems- but I still get the same error. I've tried rebooting, and reapplying
php, php-fcgi and lighhttpd. I did get the error:
Configuring apache
syntax error
httpd: bad user name nobody
after installing mod-fcgi, but that may be a red herring.
ipkg remove apache
You dont need apache when using lighttpd.
Sollie.
forget that last post - just discovered the -force-reinstall option in ipkg. Now I'm getting an error about not being able to load the library 'libxml2.so.2' - I'll try following the instructions again.
HEHE, try this:
ipkg install libxml2
Sollie.
yep, just figured that out - It all seems to be working now :) - still a few errors kicking about, but the php config script works from my browser!
Many thanks
euclyd
d3viant, tip for you, use cutenews (http://cutephp.com) as blogger on lighttpd. Its running perfect. Look at mine:
http://www.vribes.nl
Sollie.
Sollie: thanks, it looks good :)
d3viant,
Do you have an copy of talean 1.1.2 (or can you copy yours). Coz i tried the new 1.1.3rc1, couldnt get it running and forgot to keep the 1.1.2 version.
Sollie.
Sollie - you can download the previous version from sourceforge aswell:
http://sourceforge.net/project/downloading.php?group_id=154984&use_mirror=belnet&filename=telaen_1.1.2.tar.gz&7815072
Sorry, but i ffound the problem.
http://telaen.org/index.php?option=com_joomlaboard&Itemid=26&func=view&id=1072&catid=5
Little bug in the new 1.1.3 client. But its much faster after using the patch.
Thanks anyway.
Sollie.
So I was following the great Tuturial D3viant and Sollie put up and after modifying everything, I go into 192.168.1.1:8083 (port I assigned since I changed mt-daapd to run 8082..keep all ports together
Anyways, it comes backs and says it works. So I assuming that I'm suppose to dump the telean files in that directory
/opt/share/www
Question is as dumb as it may sound...How do you go about doing it..whats the command. I'm a complete n00b as unix however I'm picking everything up fairly quickly. I'll go research is but if you could tell me, let me know..
It looks pretty cool. Thanks
Dave
There's a couple of ways - I would personally recommend scp. This will securely copy the files across to your router from your pc. You will need to setup ssh first (you've probably done this already if you have mt-daapd installed) - there are tutorials on this forum. Then if you google for winscp, you will find a client that is free to download.
Install this and run it.
Enter the details of your router (IP and username/password) then click go
Drag the files from your computer on the left to the correct directory on the router on the right hand side.
glenmaroney
23-04-2007, 15:53
Ok, lets go:
1: Install php (without editing php.ini, the default works fine)
ipkg install php
2: Install fast cgi
ipkg install php-fcgi
3: Install lighttpd
ipkg install lighttpd
4: Install file editor
ipkg install nano
5: Edit lighttpd.conf
nano /opt/etc/lighttpd/lighttpd.conf
5.1 Uncomment --->
"mod_fastcgi",
5.2 Use --->
server.document-root = "/opt/share/www/"
5.3 Change serverport to --->
5.4 Uncomment --->:
Dont forget to use /opt/bin/php-fcgi
6: Chmod www directory
chmod 777 /opt/share/www
7: Create a symlink to MYSHARE1
cd /shares/MYVOLUME1/MYSHARE1
ln -s /opt/share/www
Thats all,
Sollie.
OK, so I followed this and all seemed to work. However, I have not started lighttpd. How do I do that? I tried a reboot but still can't get to port 8082.
Thank you!
hehe,
Step 8: just use the following command:
/opt/etc/init.d/S80lighttpd start
Or you can just add it to rc.local.
Sollie.
glenmaroney
24-04-2007, 17:20
Thanks for your help so far. It now looks to be nearly sorted.
I can access a PHP page but then when I try to get to a page that does anything like writing it just times out. I have checked permissions and root does look to be the owner of the file and have write permissions.
Any ideas?
Thanks again