PassMark Logo
Home » Forum

Announcement

Collapse
No announcement yet.

Using search.cgi with cgi-bin folder outside of web root

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Using search.cgi with cgi-bin folder outside of web root

    I have a large site that I'd like to use the cgi search for. My site administrator has placed the cgi-bin folder outside of my web root, so, I'm not sure how to set up my search form to post to it. Will I need to post to an intermediary page and then use a PHP command like fopen to call it server-side, or am I missing something obvious?

  • #2
    As far as I know, the CGI-BIN directory should always be under the web site root directory. You should be able to create a URL that references CGI scripts placed in the CGI-BIN directory. For example,

    http://www.yoursite.com/cgi-bin/search.cgi
    http://www.yoursite.com/cgi-bin/form-mail.cgi

    This is the whole purpose of a cgi-bin directory (to allow the use of CGI scripts).

    Note that the /cgi-bin concept is only for the Apache web server. It does not apply to the Windows/IIS web server.

    Comment


    • #3
      Sometimes it may only appear in FTP that your cgi-bin folder is outside your web root folder, but it is actually accessible via HTTP as if it was a subfolder of the web root.

      For example, in FTP, you may have
      /home/myaccount/cgi-bin/
      /home/myaccount/public_html/

      Where public_html is your web root folder, so it appears that cgi-bin is outside the web root. However, this "cgi-bin" folder is actually accessible via HTTP in the form of http://www.mysite.com/cgi-bin/

      Note though, that since the cgi-bin folder will only execute CGI scripts and not return HTML pages or directory listings, you can only really test this properly by having a CGI in place there (with execute permissions).
      --Ray
      Wrensoft Web Software
      Sydney, Australia
      Zoom Search Engine

      Comment

      Working...
      X