Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Hi I want to run certain scripts on my linux machine by simply clicking a link on a webpage that is supplied by a webserver running on that machine. It is currently running ubuntu, which webserver would be the easiest to configure such a setup? Do I have to use cgi or is there a faster / simpler way?

share|improve this question

As the above answers have mentioned, there are a few ways of doing this. Apache has been the standard webserver for Linux for a long time. It's easy to use it, and others on your ubuntu server.

What scripts are you trying to run? Are you exposing to the wild Internet or just local users? I'd be very wary of opening any of this up to the Internet. You'd then need to track webserver versions, updating as security patches come down. Even more important are your scripts. You can easily open holes to your machine. You have to be super diligent when checking and sanitizing your inputs. Your authentication on the script may leak info about users on the machine.

Depending on what you're doing, I might look for a package that already does what you want to do. For generic sysadmin stuff, i'd check out Webmin.

share|improve this answer

Most web servers can do that.

But if you are familiar with perl (or want to be) give HTTPi a try.

  • small footprint: one single small script with no additional Perl modules required; you can get away with just the Perl executable all by itself with no libraries at all
  • full features: executables/scripts, server-parsed pages, user filesystems, HTTP authentication, IP/agent security, and even IP-less and IP-based virtual hosting/multihoming
  • fast response time, configurable for even more speed
  • security: highly secure, rigourously tested
share|improve this answer

CGI is the simplest way of doing it. There are various faster ways, but they're going to be more complex, either to setup, or in programming.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .