Before I begin to focus on this blog, let me recap what has been done. So far we have a:
UNIX based system communicating with a commercial AWS and retrieving the attached sensor readings
Saves the data internally (this was not explicitly stated)
Displays the data in an HTML table (you may want to number or bullet these)
And finally plots some of the data on graphs and saves the graphs as an image (in my case .png format)
All this is being done by a python script being executed by a cron job every minute.
Ok good.. As the title suggests, "Web Hosting", I decided to take the data dissemination to the next level because all the above mentioned options were limited to the single station for viewing. At the Institute (my work place) this type of data is understandably in high demand, so web hosting the data on our internal network seemed like the logical thing to do. This would also prevent people from calling me asking for data.
I will not get into the details of which folder contains which files etc here, although I may probably do that in a later blog when I am breaking down the different aspects of this series of blogs. I will say that to host a web page you at least need some form of software to do this. The most common one and the first one I used was Apache. Once installed, it creates the folder(s) needed where by default web hosting content should be stored. These paths I guess can be changed but why would you want to do that.
I am by no means an expert when it comes to HTML scripting but there are lots of sites that can assist you with the very basics. I did some basic HTML coding before but I cant remember if that was part of a university course or on my own for personal fulfilment.
Ok. So I have an HTML page which displays a table of data and I have images in .png format and a web server installed on a UNIX based system. Could this recipe come together any better?
All that is needed now is some creativity and the structuring of what I want shown. I don't think I have a graphical design or artistic bone in my body or it was shattered into tiny pieces after getting 3 out of 10 on my art home work I spent nearly a week on and some guy who forgot to do his drew something in less than 5 minutes got 7 out of 10. Ah well... moving on, I opted to go with the standard white background for the table and the same for the images. I guess the content can speak for itself.
One thing I will say about web serving software, is that they usually default to index.html scripts. That's what they consider home base and any folders created in the original web hosting folder would just be a "/" away. Having said that, I created two folders with in the web hosting folder "student" and "aws" and within them placed the HTML scripts. The HTML table script is named "observer.html" within the "aws" folder. To access it from within our internal network you just type, "192.169.0.87/aws/observer.html" in any web browser and that will pull up the HTML page which contains the table. (providing that you are on the same sub net mask as the UNIX system)
To access the images, I created a HTML
script named "index.html" and saved that in the "student"
folder along with the images I would like to display. The content of
the "index.html" script I will discuss in detail in a
later blog. To access the images from the internal network you just
type, "192.168.0.87/student".
As you can see I did not have to write the HTML script name in the
address in this case.
I was amazed at how easy it was to host a web page and since then I have made it common place in my work to have all of my projects do some sort of web page hosting for information, analysis or diagnosis purposes. I now have a page that links to several web pages that my projects hosts and its the first thing I check on mornings when I get to work. Just to make sure all is working as it should.
I was amazed at how easy it was to host a web page and since then I have made it common place in my work to have all of my projects do some sort of web page hosting for information, analysis or diagnosis purposes. I now have a page that links to several web pages that my projects hosts and its the first thing I check on mornings when I get to work. Just to make sure all is working as it should.
![]() |
| Picture of Maintenance Web Page which links to my other project's web pages |
I guess we have the birth of a future blog but it won't be the next one.
Until next time.
Marvin...
Marvin...

No comments:
Post a Comment