How to use MBL as a web server?

There are several things you can do. Here is a couple of ideas.  I assume you can ssh to the MBL.

The easiest is to add your html code to “/var/www”  The UI is mostly in “/var/www/UI” so you will not mess it up.   You cannot have an index.hml page if you want the UI to be the default so something like mypage.html.

A little more trouble would be to use apache’s sites-available for Virtual Hosts - you can google for more examples. This is a example of having your html on the Public MBL share in WWW/My-WWW.  I use the Public share to make it easier to edit the html from my Windows machine.  Note you need to have more for security if you expose this website outside your firewall.

  1. Create WWW/My-WWW  on the Public share (It IS case-sensitive) and put your html there with an index.html.  This will be set as the DocumentRoot below.

2. In Putty: ssh root@YourMBL

  1. Type: nano /etc/apache2/sites-available/My-WWW  (This will create a file named My-WWW)

  2. Enter:

    NameVirtualHost *:8080
    Listen 0.0.0.0:8080

    <VirtualHost *:8080>
    ServerAdmin webmaster@localhost

     # Index file and Document Root (where the public files are located)
     DirectoryIndex index.html
     DocumentRoot /shares/Public/WWW/My-WWW
    
     ErrorLog /var/log/apache2/My-WWW-error.log
    
     # Possible values include: debug, info, notice, warn, error, crit,
     # alert, emerg.
     LogLevel warn
    

Ctrl-O to save, Ctrl-x to exit

  1. Type:  a2ensite My-WWW  and follow instructions to reload apache

http://YourMBL:8080 should bring up the web page

  1. Type:  a2dissite My-WWW to turn it off
3 Likes