Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6918713
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T09:53:42+00:00 2026-05-27T09:53:42+00:00

I am running Ubuntu 11 and I would like to setup a simple webserver

  • 0

I am running Ubuntu 11 and I would like to setup a simple webserver that responds to an http request by calling a local script with the GET or POST parameters. This script (already written) does some stuff and creates a file. This file should be made available at a URL, and the webserver should then make an http request to another server telling it to download the created file.

How would I go about setting this up? I’m not a total beginner with linux, but I wouldn’t say I know it well either.

What webserver should I use? How do I give permission for the script to access local resources to create the file in question? I’m not too concerned with security or anything, this is for a personal experiment (I have control over all the computers involved). I’ve used apache before, but I’ve never set it up.

Any help would be appreciated..

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T09:53:42+00:00Added an answer on May 27, 2026 at 9:53 am

    This tutorial looks good, but it’s a bit brief.

    I have apache installed. If you don’t: sudo apt-get install apache2.

    cd /usr/lib/cgi-bin
    
    # Make a file and let everyone execute it
    sudo touch test.sh && chmod a+x test.sh 
    

    Then put the some code in the file. For example:

    #!/bin/bash
    # get today's date
    OUTPUT="$(date)"
    # You must add following two lines before
    # outputting data to the web browser from shell
    # script
     echo "Content-type: text/html"
     echo ""
     echo "<html><head><title>Demo</title></head><body>"
     echo "Today is $OUTPUT <br>"
     echo "Current directory is $(pwd) <br>"
     echo "Shell Script name is $0"
     echo "</body></html>"
    

    And finally open your browser and type http://localhost/cgi-bin/test.sh

    If all goes well (as it did for me) you should see…

    Today is Sun Dec 4 …
    Current directory is /usr/lib/cgi-bin Shell
    Shell Script name is /usr/lib/cgi-bin/test.sh

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a laptop running Ubuntu that I would like to act as a
I'm running Vista on my laptop, but would like to virtualize Ubuntu so that
for a certain folder on my local Apache-Server (running with Ubuntu) I'd like that
I am currently running ubuntu 10.4, I would like to be able to run
I would like a script that does one thing if I am on campus
I am running R v2.14.1 on Ubuntu. I am writing a script that will
I am running an Ubuntu Server. I would like for it to have a
I have a server that is running Ubuntu Linux Server Edition. I once had
I have a machine that is running Ubuntu Hardy, which provides its own RubyGems
I am using Apache/2.2.8 (Ubuntu) mod_python/3.3.1 Python/2.5.2 and I would like to preload the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.