how to run cgi -script on Cygwin ?


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting how to run cgi -script on Cygwin ?
# 1  
Old 12-06-2007
how to run cgi -script on Cygwin ?

All,

I would like to run a cgi script in cygwin which i have installed in WinXP.
My CYGWIN directory structure is

/var/www/
drwxrwx---+ 2 user Users 0 Nov 23 16:24 cgi-bin
drwxrwx---+ 3 user Users 0 Oct 22 17:21 htdocs
drwxrwx---+ 3 user Users 0 Oct 22 17:22 icons


and another directory is
/srv

drwxrwx---+ 2 user Users 0 Nov 23 16:24 cgi-bin
drwxrwx---+ 3 user Users 0 Oct 22 17:21 htdocs

I have my httpd.conf file install in
/etc/apache/


when i am trying run the http process
it is sayign

Syntax error on line 205 of /etc/apache/httpd.conf:
Cannot load /var/lib/apache/mod_vhost_alias.dll into server: No such file or directory

Can you please tell me how to configure my httpd.conf file ?

ServerRoot
Document Root has been set to default .....should i modify some thing ?


--When i try to run the CGI/PERL script using perl file_name
it is fine no issue

--How to invoke the script from the Internet explore as i am tryin it in a stand alone machine with http server ?

should i use the loop back address 127.0.0.1 ? like
http://127.0.0.1/cgi-bin/cgifile.pl

?


Please guide me
# 2  
Old 12-06-2007
You should enable mod_cgi (newer installations use mod_cgid) in httpd.conf, and set up a cgi-handler and map .pl (or .cgi) to that handler.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

How to convert my /bin/sh script with cgi and html to run it on browser!??

Hello, I want to run this script on my CentOS 6 via browser : ________________________________________________________________________________________________ #!/bin/sh echo Username? read MY_NAME echo Provisional file name? read MY_FILE echo File NAME you want to save? read MY_FILE2... (16 Replies)
Discussion started by: juta2020
16 Replies

2. UNIX for Beginners Questions & Answers

How to run script through CGI?

Hi I have written a script and I want it to be run from web with the help of CGI. can you please guide me . below script is working fine if run from backend but not sure how I should run through web. #!/bin/bash string1=look string2=0 string3=.sdn.dnb echo -n "enter... (3 Replies)
Discussion started by: scriptor
3 Replies

3. Windows & DOS: Issues & Discussions

run cygwin bash script from notepad++

I'm using Notepad++ to edit my BASH scripts and using CYGWIN to run them from Windows7. In Notepad++ there is a 'Run' capability. How do I get this to run my scripts directly without having to enter the script name from the Cygwin command line? (3 Replies)
Discussion started by: millsy5
3 Replies

4. Homework & Coursework Questions

Run Program from Bash CGI-Script

Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted! 1. The problem statement, all variables and given/known data: This is a problem I am having with my 2 semester senior project. I have a LAMP server running Ubuntu 9.10 with... (8 Replies)
Discussion started by: JMooney5115
8 Replies

5. Web Development

Apache, cgi script run twice when ssl, once when not ssl

I have interesting problem. https:/host/some/x.cgi - this script has run twice when I call this url But http:/host/some/x.cgi work fine, only once. Output is text/plain. If I change output format to the Content-type text/html, then both urls works fine - executed only once. (2 Replies)
Discussion started by: kshji
2 Replies

6. UNIX for Dummies Questions & Answers

tip: Simple script won't run in cygwin - vim editor involved

I ran into this issue and thanks to various postings in various forums, was able to figure out the solution but didn't see one posting that laid the whole issue out cleanly. So thought the following might help others ... ------------------------------------------------------------------------... (2 Replies)
Discussion started by: oxysep
2 Replies

7. UNIX for Dummies Questions & Answers

How to use cygwin to run bash script

Hi, all, I try to run a quite simple bash script mytest.sh in cygwin, it's content is: #!/bin/bash echo "It is my first bash shell" there are three lines in the script. The second line is blank line. When I run it use command: bash c:/mytest.sh, ... (6 Replies)
Discussion started by: Jenny.palmy
6 Replies

8. UNIX for Dummies Questions & Answers

Run ksh script from cgi

Hi, I'm developing a system which requires me to run a ksh script from within a cgi script. What sort of syntax will I need to do this, I'm sure it's simple but can't find out how anywhere! Thanks. (2 Replies)
Discussion started by: hodges
2 Replies

9. Shell Programming and Scripting

CGI passing arrays/hashes to another CGI script

If I have a Perl CGI script (script01), which fills an array(s) with information and outputs a HTML page with a link to another CGI page (script02); is there anyway to pass the array(s) from "script01" to "script02" when the page visitor clicks the link? Hope that makes sense! :) (2 Replies)
Discussion started by: WIntellect
2 Replies

10. Cybersecurity

Run CGI As User..?

Hi, My server is set up so that all cgi scripts are run as user nobody, instead of the user's username. Now I know you can use cgi-wrappers, but someone please give me detailed information, on how to make ALL scripts run on the server to by default, run as the user? And not to run as user... (1 Reply)
Discussion started by: jason6792
1 Replies
Login or Register to Ask a Question