How to make a web-based interface for user configuration program?
Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
How to make a web-based interface for user configuration program?
Dear friends...
I currently doing a network emulator program and the features must includes the web-based interface for user configuration. I able to run my program through command line. But I would like to ask how to associate my program to web-based interface for user configuration? Please kindly advise me for any example or website. Your responses are highly appreciate. Thanks
The simplest way would be to have your site execute the command lines which configure the system via CGI.
Basically, you would have a webserver set up on the machine which contains your software.
This webserver will serve a page containing a form which has the configuration details (buttons, text boxes, check boxes)
When you click [SUBMIT] the contents of the form are POSTed to a CGI script when then parses out what needs to be done and exec()s the relevant commands to make it happen, or writes config files, or whatever.
The simplest way would be to have your site execute the command lines which configure the system via CGI.
Basically, you would have a webserver set up on the machine which contains your software.
This webserver will serve a page containing a form which has the configuration details (buttons, text boxes, check boxes)
When you click [SUBMIT] the contents of the form are POSTed to a CGI script when then parses out what needs to be done and exec()s the relevant commands to make it happen, or writes config files, or whatever.
The simplest way would be to have your site execute the command lines which configure the system via CGI.
Basically, you would have a webserver set up on the machine which contains your software.
This webserver will serve a page containing a form which has the configuration details (buttons, text boxes, check boxes)
When you click [SUBMIT] the contents of the form are POSTed to a CGI script when then parses out what needs to be done and exec()s the relevant commands to make it happen, or writes config files, or whatever.
Hi, nowonmai..
i had set up the apache webserver on my current ubuntu 9.10 machine. For the CGI script, isn't i have to convert my c programming into CGI script in order to execute the program? Thanks..
Thanks Chrism01. I had idea to write and run .cgi script through my web server. But my question is how to load module(modprobe iptable_filter & modprobe ip_queue) and set iptables rules through cgi scirpts?Thanks for reply...
How to set iptables rules and access superuser(root privilege ) in web page?
Quote:
Originally Posted by nowonmai
The simplest way would be to have your site execute the command lines which configure the system via CGI.
Basically, you would have a webserver set up on the machine which contains your software.
This webserver will serve a page containing a form which has the configuration details (buttons, text boxes, check boxes)
When you click [SUBMIT] the contents of the form are POSTed to a CGI script when then parses out what needs to be done and exec()s the relevant commands to make it happen, or writes config files, or whatever.
Hi friends..
i had wrote a network emulator program in c programming. It can run for ubuntu terminal with good performance. But i have to make it for web-based user configuration. So i had setup apache web server and write this program in cgi script and try to execute this program from web page. BUT IT CAN'T WORKS!!!
This program must be run in root privilege($sudo -s) and add the iptables rules such as (#iptables -A OUTPUT -j QUEUE). So my question is how to add iptables rules in my cgi scripts? How to set the superuser(root privilege) permission to access my program through web server? Or any other method? your reply is highly appreciate... thanks..
The program will run as the Apache user, so you'll need to edit the sudoers file to give that user the reqd privileges.
Note that apache starts up as a root user so it can bind to port 80 (& 443), then drops privileges.
The program will run as the Apache user, so you'll need to edit the sudoers file to give that user the reqd privileges.
Note that apache starts up as a root user so it can bind to port 80 (& 443), then drops privileges.
Hi.. thanks for replies.. can you briefly explain about the procedure to drop the privilege and bind port? Isn't have to add the virtual host with the 443 port in httpd.conf file?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.