Linux - Server This forum is for the discussion of Linux Software used in a server related context. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
01-13-2011, 12:27 PM
|
#1
|
LQ Newbie
Registered: Jan 2011
Posts: 3
Rep:
|
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.
|
|
|
01-13-2011, 01:42 PM
|
#2
|
Moderator
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
|
And again we need more info. I reported this post to be split out
and moved to Linux-Server for better exposure.
Cheers,
Tink
|
|
|
01-14-2011, 09:49 AM
|
#3
|
LQ Newbie
Registered: Jan 2011
Posts: 3
Original Poster
Rep:
|
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.
|
|
|
01-15-2011, 05:22 PM
|
#4
|
Moderator
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
|
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
|
|
|
01-15-2011, 08:00 PM
|
#5
|
LQ Newbie
Registered: Jan 2011
Posts: 3
Original Poster
Rep:
|
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.
|
|
|
01-17-2011, 03:17 AM
|
#7
|
LQ Guru
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,217
|
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
|
|
|
All times are GMT -5. The time now is 06:58 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|