Skip to main content

Posts

Showing posts from September, 2022

Server admin tool with php

There are plenty of software's to monitor and control Apache, Nginx, SAMBA fileserver etc. But there is one special need that pushed me to search for this. Problem I have been using a small precompiled binary on Ubuntu EC2 instance for an specific purpose. I have that binary as a service which starts as Ubuntu starts and accessible by systemctl or the command service start stop status. Now i have the process running smooth but i want to monitor it and the second requirement is to add new users to the configuration file. Both of these jobs need to be done via web interface. Step 1: Choosing a platform, from the beginning i choosed PHP over any other language, in 2006 for my MSc Project automation over internet i tried 3 languages but atlast PHP worked. This time too i choose PHP out of options NodeJS, Python, PHP .  Step 2 started with simplest code.  $output=shell_exec('ls'); and then print the variable $output via echo $output . Now this worked v...