Page 3 of 4 FirstFirst 1234 LastLast
Results 31 to 45 of 48

Thread: Complete detailed guide for PHP enabled webserver + ssh server.

  1. #31
    Quote Originally Posted by macsat
    I would like comments, both on existing turorials / guides, and on future plans....
    t
    Hi! Your tutorials are excellent. I'm voting for a ctorrent tutorial, it would be great to have console torrent client on wl500.

    Thanks again for great tutorials

  2. #32

    bittorrent is not too hard...

    It seems like all you need to do to get torrent running is :

    Code:
    ipkg install torrent
    Then you use the command :

    Code:
    btget filename.torrent
    or

    Code:
    btget -h http://www.somedomain.com/filename.torrent
    I havent testet it much, but it seems to be "it"
    macsat
    http://www.macsat.com - Tutorials and information on using ASUS WL-500G and family.

  3. #33

    SAMBA / Windows Network Share Tutorial added.

    Hi guys

    I have added a simple SAMBA tutorial on my page.

    /macsat
    macsat
    http://www.macsat.com - Tutorials and information on using ASUS WL-500G and family.

  4. #34
    I got a few problems:

    - Everytime when the webserver is running it dies after 40 minutes or less. When I open the site it says failed to connect. I've tried reinstall everything but that didn't help.

    - I've installed vsftpd. Everytime when I try to connect with a ftp client it says: "500 OOPS: vsftpd: not found: directory given in 'secure_chroot_dir':/usr/share/empty"

    I hope someone can help me with this.

  5. #35
    Join Date
    Jan 2005
    Location
    Kysice,Czech Republic
    Posts
    46
    so just make that directory;-). I suppose you followed macsat guides and you are using some kind of usb storage device. You have it mounted somewhere - you can find out where by typing
    Code:
    df
    in telnet - if you followed the guide, it should be mounted as /opt, so just make the directory
    Code:
     mkdir /opt/usr/share/empty
    and then change the value in secure_chroot_dir=/usr/share/empty (if you already created it) vsftpd config file via some text editor to this :
    secure_chroot_dir=/opt/usr/share/empty
    (you cannot just make the directory in /usr/share/empty - it is a directory directly in your asus device and cannot be so easilly changed if ever, I guess - just hoping I am not doing any FUD)

  6. #36
    The directory already excists. I've tried to put "secure_chroot_dir=/opt/usr/share/empty" in the config files but it still doesn't work.

    I still got disconnection problems with the webserver
    Log:
    click here

  7. #37
    Join Date
    Jan 2005
    Location
    Kysice,Czech Republic
    Posts
    46

    web not accesfible from wan

    I installed thttpd and it is running fine and I can see the web from the LAN side, but not from the WAN side, unless I completle disable the firewall via the webinterface. Otherwise, the server cannot be found - even when I opened ports 1:65535 both ways (LAN>WAN and WAN>LAN).
    the log says this:
    Code:
    Jun 23 21:46:36 kernel: DROPIN=eth1 OUT= MAC=00:11:2f:86:8e:f0:00:80:48:1e:6b:84:08:00 SRC=194.108.97.134 DST=10.102.236.214 LEN=48 TOS=0x00 PREC=0x20 TTL=115 ID=6375 DF PROTO=TCP SPT=1713 DPT=8080 SEQ=1399993079 ACK=0 WINDOW=8192 RES=0x00 SYN URGP=0 OPT (0204057001010402)
    Jun 23 21:46:36 kernel: DROPIN=eth1 OUT= MAC=00:11:2f:86:8e:f0:00:80:48:1e:6b:84:08:00 SRC=194.108.97.134 DST=10.102.236.214 LEN=48 TOS=0x00 PREC=0x20 TTL=115 ID=6375 DF PROTO=TCP SPT=1713 DPT=8080 SEQ=1399993079 ACK=0 WINDOW=8192 RES=0x00 SYN URGP=0 OPT (0204057001010402) 
    Jun 23 21:46:44 kernel: DROPIN=eth1 OUT= MAC=00:11:2f:86:8e:f0:00:80:48:1e:6b:84:08:00 SRC=194.108.97.134 DST=192.168.1.1 LEN=48 TOS=0x00 PREC=0x20 TTL=115 ID=6376 DF PROTO=TCP SPT=1714 DPT=81 SEQ=2333953345 ACK=0 WINDOW=8192 RES=0x00 SYN URGP=0 OPT (0204057001010402)
    194.108.97.134 being the adress os the computer I am trying to access the web (it is dynamic;-)), 10.102.236.214 being the adress of my router (I am connected through a private network, however, I have got a public IP adress, which is assigned at the gateway - at least I think so) 192.168.1.1 being adress of the router.

    I have no idea how to solve this problem - can you help me?(or at least explain, what those records in log mean?)

  8. #38

    Try..

    Hi

    did you try : http://my.router:81

    ?

    If this works, what you need is to make the ipfirewall script that forwards all incoming traffic in port 81 to port 80 :
    Code:
    #!/bin/sh
    iptables -D INPUT -j DROP
    iptables -A INPUT -p tcp --dport 81 -j ACCEPT
    iptables -A INPUT -p tcp --dport 80 -j ACCEPT
    iptables -t nat -A PREROUTING -i $1 -p tcp --dport 80 -j DNAT --to-destination $4:81
    
    iptables -A INPUT -j DROP
    Regards
    macsat
    macsat
    http://www.macsat.com - Tutorials and information on using ASUS WL-500G and family.

  9. #39
    Join Date
    Jan 2005
    Location
    Kysice,Czech Republic
    Posts
    46
    Tried that and it ain`t working either. I believe it has something to with the firewall itself, not with forwarding ports since as I have said, when I disable firewall, I can access the web from the internet and when I enable it (with all ports opened!), it is inaccesible:-/.(I can access the web pages from LAN all the time)

    (however - using virtual server, port range 80, local IP 192.168.1.1 local port 80, protocol TCP should do the same as your script, am I right?)

  10. #40
    No, you are not right :-)

    The important thing is that the web server it self listens @ port 81.

    You need to configure your router to forward all port 80 requests to internal ip port 81....this is the trick.

    when logged on to the router using telnet, try to run the following and copy-paste me the output :

    Code:
    ps
    macsat
    http://www.macsat.com - Tutorials and information on using ASUS WL-500G and family.

  11. #41
    Join Date
    Jan 2005
    Location
    Kysice,Czech Republic
    Posts
    46
    Oh stupid me, of course, I was thinking 81 but I wrote 80 - what was I thinking about:-)?

    The log is here, seems to me like thttpd is running allright?:
    Code:
      PID  Uid     VmSize Stat Command
        1 admin       336 S   /sbin/init
        2 admin           SW  [keventd]
        3 admin           SWN [ksoftirqd_CPU0]
        4 admin           SW  [kswapd]
        5 admin           SW  [bdflush]
        6 admin           SW  [kupdated]
        7 admin           SW  [mtdblockd]
       41 admin       276 S   telnetd
       46 admin       324 S   httpd eth1
       49 admin       296 S   klogd
       53 nobody      388 S   dnsmasq
       54 admin       312 S   syslogd -m 0 -O /tmp/syslog.log -S -l 7
       59 admin           SW  [khubd]
       69 admin       184 S   lpd
       71 admin       188 S   p9100d -f /dev/usb/lp0 0
       73 admin       188 S   p9101d -f /dev/printers/0 1
       76 admin       216 S   waveservermain
       80 admin           SW  [usb-storage-0]
       81 admin           SW  [scsi_eh_0]
       86 admin       224 S   infosvr br0
       89 admin       420 S   watchdog
       91 admin       248 S   ntp
      106 admin       300 S   udhcpc -i eth1 -p /var/run/udhcpc0.pid -s /tmp/udhcpc
      115 admin       772 S   /usr/sbin/nmbd -D
      117 admin       644 S   /usr/sbin/smbd -D
      123 admin           SW  [kjournald]
      133 admin       300 S   /opt/sbin/xinetd
      146 nobody     3320 S   /opt/sbin/thttpd -C /opt/etc/thttpd.conf
      157 admin       464 S   upnp -D -L br0 -W eth1
      159 admin       524 S   -sh
      161 admin       392 R   ps
    [admin@wl500g root]$ ps
      PID  Uid     VmSize Stat Command
        1 admin       328 S   /sbin/init
        2 admin           SW  [keventd]
        3 admin           SWN [ksoftirqd_CPU0]
        4 admin           SW  [kswapd]
        5 admin           SW  [bdflush]
        6 admin           SW  [kupdated]
        7 admin           SW  [mtdblockd]
       41 admin       280 S   telnetd
       46 admin       324 S   httpd eth1
       49 admin       296 S   klogd
       53 nobody      388 S   dnsmasq
       54 admin       312 S   syslogd -m 0 -O /tmp/syslog.log -S -l 7
       59 admin           SW  [khubd]
       69 admin       184 S   lpd
       71 admin       188 S   p9100d -f /dev/usb/lp0 0
       73 admin       188 S   p9101d -f /dev/printers/0 1
       76 admin       208 S   waveservermain
       80 admin           SW  [usb-storage-0]
       81 admin           SW  [scsi_eh_0]
       86 admin       224 S   infosvr br0
       89 admin       400 S   watchdog
       91 admin       240 S   ntp
      106 admin       296 S   udhcpc -i eth1 -p /var/run/udhcpc0.pid -s /tmp/udhcpc
      115 admin       764 S   /usr/sbin/nmbd -D
      117 admin       520 S   /usr/sbin/smbd -D
      123 admin           SW  [kjournald]
      133 admin       304 S   /opt/sbin/xinetd
      146 nobody     3320 S   /opt/sbin/thttpd -C /opt/etc/thttpd.conf
      157 admin       460 S   upnp -D -L br0 -W eth1
      159 admin       524 S   -sh
      163 admin       392 R   ps
    the thttpd.conf is here:
    Code:
    dir=/opt/share/www
    port=81
    user=nobody
    nochroot
    nosymlink
    novhost
    logfile=/opt/var/log/thttpd.log
    # Please do not edit pidfile path at it is use to kill thttpd process during ini
    
    pidfile=/opt/var/run/thttpd.pid

  12. #42
    Join Date
    Jan 2005
    Location
    Kysice,Czech Republic
    Posts
    46

    no progress

    I tried formating the disk and complete reinstalling of the ipkg package, but it did not help at all. However, during the instalation of thttpd, this erorr mesagge appeared(at the bottom, I am posting a complete log of the instalation):
    Code:
    [admin@wl500g root]$ /opt/bin/ipkg install php-thttpd
    Installing php-thttpd (2.25b-5.0.3-9) to root...
    Downloading http://ipkg.nslu2-linux.org/feeds/unslung/wl500g/php-thttpd_2.25b-5.
    0.3-9_mipsel.ipk
    Installing php (5.0.3-13) to root...
    Downloading http://ipkg.nslu2-linux.org/feeds/unslung/wl500g/php_5.0.3-13_mipsel
    .ipk
    Installing bzip2 (1.0.2-4) to root...
    Downloading http://ipkg.nslu2-linux.org/feeds/unslung/wl500g/bzip2_1.0.2-4_mipse
    l.ipk
    Installing openssl (0.9.7d-3) to root...
    Downloading http://ipkg.nslu2-linux.org/feeds/unslung/wl500g/openssl_0.9.7d-3_mi
    psel.ipk
    Installing zlib (1.2.2-2) to root...
    Downloading http://ipkg.nslu2-linux.org/feeds/unslung/wl500g/zlib_1.2.2-2_mipsel
    .ipk
    Installing libxml2 (2.6.17-3) to root...
    Downloading http://ipkg.nslu2-linux.org/feeds/unslung/wl500g/libxml2_2.6.17-3_mi
    psel.ipk
    Installing libxslt (1.1.12-3) to root...
    Downloading http://ipkg.nslu2-linux.org/feeds/unslung/wl500g/libxslt_1.1.12-3_mi
    psel.ipk
    Installing gdbm (1.8.3-2) to root...
    Downloading http://ipkg.nslu2-linux.org/feeds/unslung/wl500g/gdbm_1.8.3-2_mipsel
    .ipk
    Installing libdb (4.2.52-2) to root...
    Downloading http://ipkg.nslu2-linux.org/feeds/unslung/wl500g/libdb_4.2.52-2_mips
    el.ipk
    can't get //opt/lib/ipkg/info/libdb.control open for read
    Configuring bzip2
    Configuring gdbm
    Configuring libdb
    Configuring libxml2
    Configuring libxslt
    Configuring openssl
    Configuring php
    Configuring php-thttpd
    /opt/bin/update-alternatives: 185: dirname: not found
    update-alternatives: Linking //opt/sbin/htpasswd to /opt/sbin/php-thttpd-htpassw
    d
    
    
    To complete the installation, you must edit /opt/etc/thttpd.conf,
    and then run /opt/etc/init.d/S80thttpd to start thttpd.
    
    Configuring zlib
    Successfully terminated.
    Collected errors:
    Unable to open the control file in  set_flags_from_control
    Google said nothing about it, can you say if it si something important?

  13. #43
    Join Date
    Jan 2005
    Location
    Kysice,Czech Republic
    Posts
    46
    also, this is part of my starting log - does it mean something? especially this:"bind 0.0.0.0 - Address already in use"?
    Code:
    Jun 26 19:20:15 thttpd[145]: bind 0.0.0.0 - Address already in use
    Jun 26 19:20:22 thttpd[145]: thttpd/2.25b PHP/5.0.3 starting on port 81
    Jun 26 19:20:22 thttpd[145]: started as root without requesting chroot(), warning only

  14. #44

    Crontab tutorial added.

    Hi

    I have written a complete Tutorial on how to install and configure cron for running scheduled jobs on your ASUS.

    I have set up a cron-system that is kindda "RedHat-like", and very easy to use even for non-advanced users, once it has been setup by completing the Tutorial :-)
    macsat
    http://www.macsat.com - Tutorials and information on using ASUS WL-500G and family.

  15. #45
    Join Date
    Apr 2005
    Location
    Eindhoven, The Netherlands
    Posts
    23
    Hi macsat,

    thanks for another fine tutorial.

    a few questions:

    - what is "root" supposed to be in a crontab line? is it part of the command?

    - i have running a crond already, it uses a uses specific crontab e.g.
    /tmp/var/spool/cron/crontabs/admin

    this other crontab seems to have the standard crontab format. It runs fine.

    [admin@DELTA /tmp]$ cat /tmp/var/spool/cron/crontabs/admin
    # 0 * * * * cp /opt/var/log/tcpdump.log /tmp/harddisk/LOG/TCP/tcpdump.tmp-$$
    # 0 * * * * cp /opt/var/log/syslog.log /tmp/harddisk/LOG/SYS/syslog.tmp-$$
    # 0 * * * * cp /opt/var/log/vsftpd.log /tmp/harddisk/LOG/FTP/vsftpd.tmp-$$
    # 2 * * * * cat /opt/ftp.mai /opt/var/log/vsftpd.log | sendmail xxxxxxxxxxxx@gmail.com
    # 4 * * * * cat /opt/sys.mai /opt/var/log/syslog.log | sendmail xxxxxxxxxxxx@gmail.com
    could you give comment on admin's crontab please?

Page 3 of 4 FirstFirst 1234 LastLast

Similar Threads

  1. Idiot's guide to setting up bridge mode?
    By tsb4k in forum WL-HDD Q&A
    Replies: 0
    Last Post: 04-09-2005, 00:46
  2. Internet is blocked when WL-500 is enabled
    By Old Harry in forum WL-500g Q&A
    Replies: 2
    Last Post: 22-12-2004, 17:52
  3. Complete webserver+ftp installation
    By seann in forum WL-500g Q&A
    Replies: 9
    Last Post: 19-12-2004, 23:01
  4. detailed logfiles
    By tommy777 in forum WL-500g Q&A
    Replies: 1
    Last Post: 30-05-2004, 21:54

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •