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

  • Home
  • SEARCH
  • 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 7665881
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T14:41:25+00:00 2026-05-31T14:41:25+00:00

I have a homework assignment that I am supposed to write a http server

  • 0

I have a homework assignment that I am supposed to write a http server that is supposed to process an input given in a form on my index.html page. To do this I have a form that uses the POST action and links to a cgi file. The problem that I am having is linking to my cgi file. My index file and the cgi file are in the same folder so my form looks something like this:

    <form action="test.cgi" method="POST">
    Username: <input type="text" name="user" />
    <input type="submit" value="Submit" />
  </form> 

When I connect to my server I connect to: localhost:PORT which gives me the index file and when I hit the submit button I get linked to localhost:PORT/test.cgi

In my mind this should directly link me to my cgi file and everything should work. I know that this must be because I do not understand how the server organizes the files on my computer. Could someone explain to me how this works?

If I didn’t post some vital information just let me know and I will edit the post as soon as possible.

  • 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-31T14:41:27+00:00Added an answer on May 31, 2026 at 2:41 pm

    Since you are writing the HTTP server, you can define the ‘rules’ of CGI processing 🙂

    Apache, for example, by default requires one to place CGI scripts in cgi-bin directory to enable their execution. This is all configurable via httpd.conf – so user can disable CGI or specify another directory for CGI scripts via the configuration file – you may choose to do something similar.

    Also note that the file extensions for CGI files are typically test.pl (for perl scripts) and the server usually does a fork/exec of the specified script file

    http://httpd.apache.org/docs/2.0/howto/cgi.html is a good reference

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

Sidebar

Related Questions

I have a homework assignment that asks to create an order form. The order
I have a homework assignment where I need to take input from a file
I have a homework assignment which asks to have the user input a date
For my homework assignment, I have a network of Nodes that are passing messages
I have been given a homework assignment where I need to create a captcha
Have a homework assignment in which I'm supposed to create a vector of pointers
Im almost done with a homework assignment that multiplies polynomials and has to have
For a homework assignment I have to write a basic shell including redirection. The
This is part of a homework assignment. What we have to do is write
I'm very new to XML and XSLT. I have a homework assignment that asks

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.