Loading ...
Sorry, an error occurred while loading the content.

Setting up webserver - please help!

Expand Messages
  • raspden
    Hi there, I ve just got a NSLU2 and have unslung it with the latest firmware. I m just trying to get to grips with setting up applications on it. However as my
    Message 1 of 5 , Jan 23, 2008
    • 0 Attachment
      Hi there,

      I've just got a NSLU2 and have unslung it with the latest firmware.
      I'm just trying to get to grips with setting up applications on it.
      However as my Linux experience is a bit basic I'm finding it tricky.

      What I'm trying to do is set up a webserver running PHP and MYSQL. I
      have opted for lightttpd as it's supposed to be resource friendly, and
      I installed this first. I then installed PHP, then MySQL, then finally
      PHPMyAdmin so I could administer databases.

      But now I'm stuck as to what to do next. I have no idea whether it's
      running ok. I doubt it as I assume I need to configue lighttpd to work
      with PHP and MySQL. But I don't know what needs configuering. I don't
      even know how to restart the lighttpd server. I looked at this
      website: http://gentoo-wiki.com/HOWTO_Lighttpd#Restarting_Lighttpd but
      on the NSLU2 the path /etc/init.d/lighttpd does not exist.

      The other thing is I don't know the url to browse to in order to view
      the webserver. I have looked in the lighttpd.conf file but can find no
      trace of such a setting for servername. I'm confident I can get things
      set up easily enough if I can just get the server running, PHP
      installed and then MySQL.

      Anyhow I was looking for some sort of guide to help with setting up
      the lighttpd webserver on the NSLU2. Is there one available anywhere
      which could help me out? I've also seen many references that say that
      php-fastcgi needs to be installed. Do I install this alongside PHP or
      instead of?

      Finally maybe someone can advise me on where to put put my websites. I
      have unslung to an 80GB hard drive and it's created two partitions:
      ADMIN 2 and DISK 2. What size are these partitions? How do I find out?
      If the ADMIN partition is small is it better to host my sites on DISK 2?

      Many apologies for all the questions but I'm a bit stuck and then
      internet is not being helpful in finding out answers.

      Cheers.
    • Robert Hammond
      In message , raspden writes ... You need to also install php-mysql and php-fcgi There are some config files that
      Message 2 of 5 , Jan 23, 2008
      • 0 Attachment
        In message <fn7a66+hjv8@...>, raspden <raspden@...> writes
        >Hi there,
        >
        >I've just got a NSLU2 and have unslung it with the latest firmware.
        >I'm just trying to get to grips with setting up applications on it.
        >However as my Linux experience is a bit basic I'm finding it tricky.
        >
        >What I'm trying to do is set up a webserver running PHP and MYSQL. I
        >have opted for lightttpd as it's supposed to be resource friendly, and
        >I installed this first. I then installed PHP, then MySQL, then finally
        >PHPMyAdmin so I could administer databases.
        >
        You need to also install
        php-mysql
        and
        php-fcgi

        There are some config files that will need changing, the recommended
        route for this is to install the openssh optware package and if
        connecting with a WinXP machine use WinSCP. WinSCP has a built in Linux
        compatible text editor. (Alternatively just use one of the command
        line editors such as vi).

        Check out the Wiki page
        <http://www.nslu2-linux.org/wiki/HowTo/DeployPHPWebAppUsingFastCGI>

        You will need to add the fastcgi.server configuration to the
        lighttpd.conf file.

        I think that the optware version of lighttpd defaults to port 8081

        To access the default web page use http://192.168.1.77:8081

        >But now I'm stuck as to what to do next. I have no idea whether it's
        >running ok. I doubt it as I assume I need to configue lighttpd to work
        >with PHP and MySQL. But I don't know what needs configuering. I don't
        >even know how to restart the lighttpd server. I looked at this
        >website: http://gentoo-wiki.com/HOWTO_Lighttpd#Restarting_Lighttpd but
        >on the NSLU2 the path /etc/init.d/lighttpd does not exist.
        >
        The default home page location for all of the Optware web servers is
        /opt/share/www. When you first install lighttpd it is configured for
        /opt/share/www/lighttpd/ where a web page is located to check that the
        web server is running OK. At some stage you will probably need to
        change this back to the correct home folder by deleting the trailing
        lighttpd/. This is configurable in the above mentioned config file.

        Lighttpd automatically starts under unslung using a script installed at
        /opt/etc/init.d/S80lighttpd

        You can stop and start the daemon from a console prompt (you will need
        to do this if you change anything in the config file) by typing
        /opt/etc/init.d/S80lighttpd stop
        /opt/etc/init.d/S80lighttpd start

        >The other thing is I don't know the url to browse to in order to view
        >the webserver. I have looked in the lighttpd.conf file but can find no
        >trace of such a setting for servername. I'm confident I can get things
        >set up easily enough if I can just get the server running, PHP
        >installed and then MySQL.
        >
        >Anyhow I was looking for some sort of guide to help with setting up
        >the lighttpd webserver on the NSLU2. Is there one available anywhere
        >which could help me out? I've also seen many references that say that
        >php-fastcgi needs to be installed. Do I install this alongside PHP or
        >instead of?
        Yes because lighttpd will not work with just the standard PHP.
        >
        >Finally maybe someone can advise me on where to put put my websites. I
        >have unslung to an 80GB hard drive and it's created two partitions:
        >ADMIN 2 and DISK 2. What size are these partitions? How do I find out?
        >If the ADMIN partition is small is it better to host my sites on DISK 2?
        >
        I think that ADMIN 2 and DISK 2 are just Samba share names and not
        partitions, all data is stored on the same data partition, size will
        be close to 80GB
        .
        >Many apologies for all the questions but I'm a bit stuck and then
        >internet is not being helpful in finding out answers.
        >
        >Cheers.

        --
        Robert Hammond
        PGP:0x154144DA
      • Charles Chambers
        Mount the drive at bootup to a mount point and move *all* your website-related data files (database tables, HTML, etc...not OS or program material) onto the
        Message 3 of 5 , Jan 23, 2008
        • 0 Attachment
          Mount the drive at bootup to a mount point and move
          *all* your website-related data files (database
          tables, HTML, etc...not OS or program material) onto
          the NSLU.

          Like this:

          1) Install OS. Make certain you install all
          samba/smb packages.

          2) Install all webserver packages (Apache2, wu-ftpd,
          etc), configuring at first to use
          /mnt/whatever-it-wants.

          3) Make directory /mnt/whatever-you-want. Add NSLU2
          to fstab (not sure how yet) or add "mount -t cifs -o
          pass="whatever" "//[static ip of NSLU]/[disk
          name of drive]" /mnt/what-you-really-want

          4) Reconfigure software (Apache, ftp, database, etc)
          to point to new /mnt/whatever-you-really-want.

          Swap 2 and 3 as you learn and reinstall <g>.

          You'll end up being able to back up just the web
          server, or the OS, but you won't have to back up both.

          ======================

          "raspden" <raspden@...> wrote in message
          news:fn7a66+hjv8@......
          > Hi there,
          >
          > I've just got a NSLU2 and have unslung it with the
          latest firmware.
          > I'm just trying to get to grips with setting up
          applications on it.
          > However as my Linux experience is a bit basic I'm
          finding it tricky.
          >
          > What I'm trying to do is set up a webserver running
          PHP and MYSQL. I
          > have opted for lightttpd as it's supposed to be
          resource friendly, and
          > I installed this first. I then installed PHP, then
          MySQL, then finally
          > PHPMyAdmin so I could administer databases.

          Good so far.

          >
          > But now I'm stuck as to what to do next. I have no
          idea whether it's
          > running ok. I doubt it as I assume I need to
          configue lighttpd to work
          > with PHP and MySQL. But I don't know what needs
          configuering. I don't
          > even know how to restart the lighttpd server. I
          looked at this
          > website:
          http://gentoo-wiki.com/HOWTO_Lighttpd#Restarting_Lighttpd
          but
          > on the NSLU2 the path /etc/init.d/lighttpd does not
          exist.

          I don't know about lighttpd. On Apache, the process
          of httpd shows up if it is running at all.

          You will also want to set up virtual servers, unless
          this is a training/testing setup. That starts to make
          the site a bit more involved.

          >
          > The other thing is I don't know the url to browse to
          in order to view
          > the webserver. I have looked in the lighttpd.conf
          file but can find no
          > trace of such a setting for servername. I'm
          confident I can get things
          > set up easily enough if I can just get the server
          running, PHP
          > installed and then MySQL.

          You are going to browse to the address of the NIC on
          your LAN. That's where your router/routing server
          will send visitors.

          However, don't expct anything beyond your default
          page. The page request won't have your virtual
          hostname in it, so you should get a default page, and
          be able to navigate it.


          >
          > Anyhow I was looking for some sort of guide to help
          with setting up
          > the lighttpd webserver on the NSLU2. Is there one
          available anywhere
          > which could help me out? I've also seen many
          references that say that
          > php-fastcgi needs to be installed. Do I install this
          alongside PHP or
          > instead of?

          With PHP, not instead of IIRC.

          >
          > Finally maybe someone can advise me on where to put
          put my websites. I
          > have unslung to an 80GB hard drive and it's created
          two partitions:
          > ADMIN 2 and DISK 2. What size are these partitions?
          How do I find out?
          > If the ADMIN partition is small is it better to host
          my sites on DISK 2?

          When you mount the NSLU2 properly in your file system,
          they will show up when you run "df" (disk free).

          Also see above. I have one I'm setting up in final
          form, and two drives attachd to the NSLU2 are mounted
          at /hosting/www and /hosting/mail, the mail and
          web/ftp folders. That's so I can unmount, backup the
          system, and then remount. On a different schedule, I
          can archive starting at /hosting and get all of the
          visitors' data.

          >
          > Many apologies for all the questions but I'm a bit
          stuck and then
          > internet is not being helpful in finding out
          answers.

          The Internet appreciates you trying first, which you
          probbly have been <g>.




          cchamb2@...
          cchamb2@...
          cchamb21@...
          cchamb2@...
          cchamb2@...
          38140367@...


          ____________________________________________________________________________________
          Never miss a thing. Make Yahoo your home page.
          http://www.yahoo.com/r/hs
        • raspden
          This has been really helpful. Thanks for your replies. The web server is now up and running. It seems to be going well. I just have one more problem. I wish to
          Message 4 of 5 , Jan 27, 2008
          • 0 Attachment
            This has been really helpful. Thanks for your replies. The web server
            is now up and running. It seems to be going well. I just have one more
            problem. I wish to use virtual hosts for each of my sites but just
            cannot get them to work ok. I started with setting up a virtual host
            file for the phpmyadmin installation. So I added the following to the
            bottom of the lighttpd.conf file:

            $HTTP["host"] == "pma.rhazzzz.com" {
            server.document-root = "/opt/share/www/phpmyadmin"
            server.errorlog = "/var/log/lighttpd/phpmyadmin/error.log"
            accesslog.filename = "/var/log/lighttpd/phpmyadmin/access.log"
            #server.error-handler-404 = "/e404.php"
            }

            I then restarted the lighttpd server and navigated to
            http://pma.rhazzzz.com but the browser could find no page. So I tried
            adding :8081 to the url and still no joy. I then tried adding the line
            'server.port = 8081' to the virtual host and still no joy.

            I have tried this set up with both 'mod_evhost' and 'mod_simple_vhost'
            installed but it seems to make no difference.

            Therefore I'd be most grateful for guidance on this if someone can
            help me out.

            Cheers.

            --- In nslu2-general@yahoogroups.com, Robert Hammond <rob.hammond@...>
            wrote:
            >
            > In message <fn7a66+hjv8@...>, raspden <raspden@...> writes
            > >Hi there,
            > >
            > >I've just got a NSLU2 and have unslung it with the latest firmware.
            > >I'm just trying to get to grips with setting up applications on it.
            > >However as my Linux experience is a bit basic I'm finding it tricky.
            > >
            > >What I'm trying to do is set up a webserver running PHP and MYSQL. I
            > >have opted for lightttpd as it's supposed to be resource friendly, and
            > >I installed this first. I then installed PHP, then MySQL, then finally
            > >PHPMyAdmin so I could administer databases.
            > >
            > You need to also install
            > php-mysql
            > and
            > php-fcgi
            >
            > There are some config files that will need changing, the recommended
            > route for this is to install the openssh optware package and if
            > connecting with a WinXP machine use WinSCP. WinSCP has a built in
            Linux
            > compatible text editor. (Alternatively just use one of the command
            > line editors such as vi).
            >
            > Check out the Wiki page
            > <http://www.nslu2-linux.org/wiki/HowTo/DeployPHPWebAppUsingFastCGI>
            >
            > You will need to add the fastcgi.server configuration to the
            > lighttpd.conf file.
            >
            > I think that the optware version of lighttpd defaults to port 8081
            >
            > To access the default web page use http://192.168.1.77:8081
            >
            > >But now I'm stuck as to what to do next. I have no idea whether it's
            > >running ok. I doubt it as I assume I need to configue lighttpd to work
            > >with PHP and MySQL. But I don't know what needs configuering. I don't
            > >even know how to restart the lighttpd server. I looked at this
            > >website: http://gentoo-wiki.com/HOWTO_Lighttpd#Restarting_Lighttpd but
            > >on the NSLU2 the path /etc/init.d/lighttpd does not exist.
            > >
            > The default home page location for all of the Optware web servers is
            > /opt/share/www. When you first install lighttpd it is configured for
            > /opt/share/www/lighttpd/ where a web page is located to check that the
            > web server is running OK. At some stage you will probably need to
            > change this back to the correct home folder by deleting the trailing
            > lighttpd/. This is configurable in the above mentioned config file.
            >
            > Lighttpd automatically starts under unslung using a script installed at
            > /opt/etc/init.d/S80lighttpd
            >
            > You can stop and start the daemon from a console prompt (you will need
            > to do this if you change anything in the config file) by typing
            > /opt/etc/init.d/S80lighttpd stop
            > /opt/etc/init.d/S80lighttpd start
            >
            > >The other thing is I don't know the url to browse to in order to view
            > >the webserver. I have looked in the lighttpd.conf file but can find no
            > >trace of such a setting for servername. I'm confident I can get things
            > >set up easily enough if I can just get the server running, PHP
            > >installed and then MySQL.
            > >
            > >Anyhow I was looking for some sort of guide to help with setting up
            > >the lighttpd webserver on the NSLU2. Is there one available anywhere
            > >which could help me out? I've also seen many references that say that
            > >php-fastcgi needs to be installed. Do I install this alongside PHP or
            > >instead of?
            > Yes because lighttpd will not work with just the standard PHP.
            > >
            > >Finally maybe someone can advise me on where to put put my websites. I
            > >have unslung to an 80GB hard drive and it's created two partitions:
            > >ADMIN 2 and DISK 2. What size are these partitions? How do I find out?
            > >If the ADMIN partition is small is it better to host my sites on
            DISK 2?
            > >
            > I think that ADMIN 2 and DISK 2 are just Samba share names and not
            > partitions, all data is stored on the same data partition, size will
            > be close to 80GB
            > .
            > >Many apologies for all the questions but I'm a bit stuck and then
            > >internet is not being helpful in finding out answers.
            > >
            > >Cheers.
            >
            > --
            > Robert Hammond
            > PGP:0x154144DA
            >
          • herriedoc
            If your computer and your NSLU2 are in the samen subnet using one public IP-adress (e.g. like behind a common household NAT-router) and you have IP traffic for
            Message 5 of 5 , Jan 28, 2008
            • 0 Attachment
              If your computer and your NSLU2 are in the samen subnet using one public IP-adress (e.g.
              like behind a common household NAT-router) and you have IP traffic for your HTTP-port
              redirected your PC cannot find the adress like any computer outside the local network.

              2 solutions:
              1. check your website out using another connection to the internet to check out network
              setup
              2. modify your hosts-file on your computer (for Windows, I'm not sure what you can do,
              sorry) to be sure if you use the adress you actually get your webserver (nice for
              maintenance purposes)

              --- In nslu2-general@yahoogroups.com, "raspden" <raspden@...> wrote:
              >
              > This has been really helpful. Thanks for your replies. The web server
              > is now up and running. It seems to be going well. I just have one more
              > problem. I wish to use virtual hosts for each of my sites but just
              > cannot get them to work ok. I started with setting up a virtual host
              > file for the phpmyadmin installation. So I added the following to the
              > bottom of the lighttpd.conf file:
              >
              > $HTTP["host"] == "pma.rhazzzz.com" {
              > server.document-root = "/opt/share/www/phpmyadmin"
              > server.errorlog = "/var/log/lighttpd/phpmyadmin/error.log"
              > accesslog.filename = "/var/log/lighttpd/phpmyadmin/access.log"
              > #server.error-handler-404 = "/e404.php"
              > }
              >
              > I then restarted the lighttpd server and navigated to
              > http://pma.rhazzzz.com but the browser could find no page. So I tried
              > adding :8081 to the url and still no joy. I then tried adding the line
              > 'server.port = 8081' to the virtual host and still no joy.
              >
              > I have tried this set up with both 'mod_evhost' and 'mod_simple_vhost'
              > installed but it seems to make no difference.
              >
              > Therefore I'd be most grateful for guidance on this if someone can
              > help me out.
              >
              > Cheers.
              >
              > --- In nslu2-general@yahoogroups.com, Robert Hammond <rob.hammond@>
              > wrote:
              > >
              > > In message <fn7a66+hjv8@>, raspden <raspden@> writes
              > > >Hi there,
              > > >
              > > >I've just got a NSLU2 and have unslung it with the latest firmware.
              > > >I'm just trying to get to grips with setting up applications on it.
              > > >However as my Linux experience is a bit basic I'm finding it tricky.
              > > >
              > > >What I'm trying to do is set up a webserver running PHP and MYSQL. I
              > > >have opted for lightttpd as it's supposed to be resource friendly, and
              > > >I installed this first. I then installed PHP, then MySQL, then finally
              > > >PHPMyAdmin so I could administer databases.
              > > >
              > > You need to also install
              > > php-mysql
              > > and
              > > php-fcgi
              > >
              > > There are some config files that will need changing, the recommended
              > > route for this is to install the openssh optware package and if
              > > connecting with a WinXP machine use WinSCP. WinSCP has a built in
              > Linux
              > > compatible text editor. (Alternatively just use one of the command
              > > line editors such as vi).
              > >
              > > Check out the Wiki page
              > > <http://www.nslu2-linux.org/wiki/HowTo/DeployPHPWebAppUsingFastCGI>
              > >
              > > You will need to add the fastcgi.server configuration to the
              > > lighttpd.conf file.
              > >
              > > I think that the optware version of lighttpd defaults to port 8081
              > >
              > > To access the default web page use http://192.168.1.77:8081
              > >
              > > >But now I'm stuck as to what to do next. I have no idea whether it's
              > > >running ok. I doubt it as I assume I need to configue lighttpd to work
              > > >with PHP and MySQL. But I don't know what needs configuering. I don't
              > > >even know how to restart the lighttpd server. I looked at this
              > > >website: http://gentoo-wiki.com/HOWTO_Lighttpd#Restarting_Lighttpd but
              > > >on the NSLU2 the path /etc/init.d/lighttpd does not exist.
              > > >
              > > The default home page location for all of the Optware web servers is
              > > /opt/share/www. When you first install lighttpd it is configured for
              > > /opt/share/www/lighttpd/ where a web page is located to check that the
              > > web server is running OK. At some stage you will probably need to
              > > change this back to the correct home folder by deleting the trailing
              > > lighttpd/. This is configurable in the above mentioned config file.
              > >
              > > Lighttpd automatically starts under unslung using a script installed at
              > > /opt/etc/init.d/S80lighttpd
              > >
              > > You can stop and start the daemon from a console prompt (you will need
              > > to do this if you change anything in the config file) by typing
              > > /opt/etc/init.d/S80lighttpd stop
              > > /opt/etc/init.d/S80lighttpd start
              > >
              > > >The other thing is I don't know the url to browse to in order to view
              > > >the webserver. I have looked in the lighttpd.conf file but can find no
              > > >trace of such a setting for servername. I'm confident I can get things
              > > >set up easily enough if I can just get the server running, PHP
              > > >installed and then MySQL.
              > > >
              > > >Anyhow I was looking for some sort of guide to help with setting up
              > > >the lighttpd webserver on the NSLU2. Is there one available anywhere
              > > >which could help me out? I've also seen many references that say that
              > > >php-fastcgi needs to be installed. Do I install this alongside PHP or
              > > >instead of?
              > > Yes because lighttpd will not work with just the standard PHP.
              > > >
              > > >Finally maybe someone can advise me on where to put put my websites. I
              > > >have unslung to an 80GB hard drive and it's created two partitions:
              > > >ADMIN 2 and DISK 2. What size are these partitions? How do I find out?
              > > >If the ADMIN partition is small is it better to host my sites on
              > DISK 2?
              > > >
              > > I think that ADMIN 2 and DISK 2 are just Samba share names and not
              > > partitions, all data is stored on the same data partition, size will
              > > be close to 80GB
              > > .
              > > >Many apologies for all the questions but I'm a bit stuck and then
              > > >internet is not being helpful in finding out answers.
              > > >
              > > >Cheers.
              > >
              > > --
              > > Robert Hammond
              > > PGP:0x154144DA
              > >
              >
            Your message has been successfully submitted and would be delivered to recipients shortly.