LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
Search this Thread
Old 01-13-2011, 11:27 AM   #1
mykolg
LQ Newbie
 
Registered: Jan 2011
Posts: 3

Rep: Reputation: 0
Run My CGI Script from Webpage


ok, well I removed CYGWIN and installed a Ubuntu 10.10 64bit virtual box and now I have it running, but I still can't get it to run my CGI script from my webpage that i have on Ubuntu platform. I was wondering if there was a certain way that I need to install apache or whatever to get it running correctly.
 
Old 01-13-2011, 12:42 PM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 22,978
Blog Entries: 11

Rep: Reputation: 879Reputation: 879Reputation: 879Reputation: 879Reputation: 879Reputation: 879Reputation: 879
And again we need more info. I reported this post to be split out
and moved to Linux-Server for better exposure.



Cheers,
Tink
 
Old 01-14-2011, 08:49 AM   #3
mykolg
LQ Newbie
 
Registered: Jan 2011
Posts: 3

Original Poster
Rep: Reputation: 0
Well, I got my linux up and running, my code runs fine when I run it in the terminal, then I tried to run the HTML and have that run my CGI and it just showed the code, therefore i then installed apache2 through the terminal and that is far as I have gone. I recall that you mentioned that I needed to setup the httpd.conf file. I was wondering if you could step me through as how to do so.
 
Old 01-15-2011, 04:22 PM   #4
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 22,978
Blog Entries: 11

Rep: Reputation: 879Reputation: 879Reputation: 879Reputation: 879Reputation: 879Reputation: 879Reputation: 879
Hi, sorry for the delayed response - busy, busy.


I am not sure how ubuntu splits the configuration out, but there
are a few generic points you need to bear in mind (and tel us about ;}).

Are you trying to use CGI from users home, of from apache's cgi-bin
directory? The way CGI works is that the scripts AREN'T in the htdocs
directory, but in cgi-bin ... have a look though your existing httpd.conf
(and the conf subdir(s)) under it.



Cheers,
Tink
 
Old 01-15-2011, 07:00 PM   #5
mykolg
LQ Newbie
 
Registered: Jan 2011
Posts: 3

Original Poster
Rep: Reputation: 0
Well, from my Home directory it goes /Home/Programs/StateJournal/*.*

I have both my sjScript.cgi and SJ.html in that folder.

I looking in the httpd.conf file in etc/apache2/ and that file was empty, I find that to be very awkward. Not sure what to do with that then...

As for the cgi-bin folder, not sure where to look, I found it in my usr/lib/ not sure if that is the right one.
 
Old 01-15-2011, 08:02 PM   #6
joec@home
Member
 
Registered: Sep 2009
Location: Houston Tx
Posts: 89

Rep: Reputation: 29
Have you installed mod_perl in Apache? Depending on the version I think you can check with the following command:

httpd -lM

More info:

Welcome to the mod_perl world
http://perl.apache.org/

3.3. mod_perl
http://www.delouw.ch/linux/Apache-Co...he.html#AEN410
 
Old 01-17-2011, 02:17 AM   #7
bathory
Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 10,908

Rep: Reputation: 1326Reputation: 1326Reputation: 1326Reputation: 1326Reputation: 1326Reputation: 1326Reputation: 1326Reputation: 1326Reputation: 1326Reputation: 1326
Quote:
Well, from my Home directory it goes /Home/Programs/StateJournal/*.*
You should use in apache2.conf (or /etc/apache2/sites-enabled/000-default):
Code:
<Directory /Home/Programs/StateJournal>
Options +ExecCGI
AddHandler cgi-script .cgi
Order allow,deny
Allow from all
</Directory>
Regards
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
could not get cgi script info onto webpage linux_cv Linux - Newbie 1 05-28-2009 07:37 AM
CGI script problem: Send/Expect command echo on webpage rajatgarg Programming 2 07-11-2004 04:38 PM
Allow user to run their own cgi script samwong Linux - Newbie 5 05-25-2004 10:22 PM
cgi script doesn't run just downloads SchoolITguy Programming 3 12-19-2002 03:08 PM
Auto Run A Cgi Script f117bomb Linux - General 1 11-25-2001 01:18 AM


All times are GMT -5. The time now is 04:40 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration