Announcement

Collapse
No announcement yet.

Web Server Initial page, ie. home page

Collapse
This is a sticky topic.
X
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Web Server Initial page, ie. home page

    Hello everyone,

    My question concerns custom web pages and applets. From my experience working with PC based web servers, I understand that the server app can be directed to a particular webpage once a client has established a connection.
    In short, how do I configure the matchport to load a certain webpage once a client has requested a connection, For example a home page.

    Thank you in advance.

    Philip

  • #2
    When a file is not specified in the URL (the address specified in a browser), the web server assumes index.html. This is common to all web servers and is the starting point for the web manager that comes with the device.

    The web pages for the Lantronix Web Manager are embedded in the firmware image. To override the web manager (and index.html), place your html files in the /http/config directory. You will need to create the http and config directories on the file system page of the web manager, or via the CLI or FTP first.

    Samples of index.html, and in fact the entire web manager are available with the SDK.

    You can also review the SDK User Guide for additional details on customizing the web manager.

    Comment


    • #3
      Thanks

      Thanks Matt for pointing that out, I will dig a little deeper into the SDK. You are right index.html is the default page, it apparently slipped my mind. Thanks again

      Comment


      • #4
        Web Server Initial Page

        Hello,

        I need to change the initial page.

        In your web server this is config/index.html, where there are all the functionality that configures the Matchport.

        I need to protect this "config" directory, but I need to put the initial page out of this directory.

        I want to put an index.html in the filesystem /http/ and I want to do this the initial page avalaible without permision.

        On the other hand, the url http://IP.ADD.RE.SS/index.html get an error... this is not web server standar feature.

        Well I want:

        http://IP.ADD.RE.SS/
        http://IP.ADD.RE.SS/index.html

        resolves filesystem /http/index.html

        http://IP.ADD.RE.SS/config/
        http://IP.ADD.RE.SS/config/index.html

        resolves filesystem /http/config/index.html and with authentication.


        I tried to fix it with a cgi:

        if(! HttpDynamicCallbackAdd(httpServer, "/", getIndexCallback))
        {
        .....
        }

        if(! HttpDynamicCallbackAdd(httpServer, "/index.html", getIndexCallback))
        {
        ....
        }

        This works with the second one but don't work with the first one.


        Thanks in advance.

        Carlos San Esteban

        Comment


        • #5
          It works. I called my html file "index.html", and put it in the html/config directory. Now when I access the Lantronix device with the browser, I get the my web page instead of the Lantronix configuration pages.

          However, I still need to access the configuration pages. I there a URL I can type to get to the configuration pages, or a way I can add a link to configuration pages into my html files?

          Comment


          • #6
            Hello. After you have your initial page(home page) up and running, you need to start writing some CGI programs to do some real work. How to write my CGI code under the EvOS environment? I have the experience of Linux but I don't know how to code in EvOS? Should I have to switch to Linux SDK?
            Thanks.

            Comment


            • #7
              Originally posted by zhejunli View Post
              Hello. After you have your initial page(home page) up and running, you need to start writing some CGI programs to do some real work. How to write my CGI code under the EvOS environment? I have the experience of Linux but I don't know how to code in EvOS? Should I have to switch to Linux SDK?
              Thanks.
              Have a look at the cgi.c sample and in particular, how the sampleWebMgrCallback function works.

              Comment

              Working...
              X