nixCraft Linux Forum

nixCraft

Linux Tech Support Forum

HTML Program cannot open in cgi-bin folder

This is a discussion on HTML Program cannot open in cgi-bin folder within the Linux software forums, part of the Linux Getting Started category; Dear friends, I want to run some CGI/PERL programs associated with html programs. So I kept HTML program and linked ...


Go Back   nixCraft Linux Forum > Linux Getting Started > Linux software

Register FAQ Members List Calendar Forgotten your password? Mark Forums Read
  #1 (permalink)  
Old 01-30-2005, 08:31 PM
Junior Member
User
 
Join Date: Jan 2005
Posts: 19
Rep Power: 0
sonaikar
Default HTML Program cannot open in cgi-bin folder

Dear friends,

I want to run some CGI/PERL programs associated with html programs. So I kept HTML program and linked files in /var/www/cgi-bin. The Html program cannot get compiled.

But when I kept the same programs in /var/www/html with minor changes in ACTION tab to directoy indicating to cgi-bin it works fine.
I opened these programs using Mozilla .

I am puzzeled why it is so and tried to find answer for last whole night and simply lost my sleep .

Are there any settings in httpd.conf related to this ??

Hope you make me smile again

[[/quote]
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 01-31-2005, 07:10 PM
monk's Avatar
Senior Member
User
 
Join Date: Jan 2005
Location: Tibet
My distro: Debian GNU/Linux
Posts: 482
Rep Power: 5
monk will become famous soon enough monk will become famous soon enough
Default

First cgi-bin program written in perl are in text format and not the compiled one as far as i know it. Here is simple example

Code:
#!/usr/local/bin/perl
print "Content-type: text/plain\n";
print "Hi\n I am the monk\n";
Then save it and setup executable permission on it using
chmod +x my.perl

Place program in cgi-bin directory.

Yes you may need to point correct directory in httpd-conf.
Reply With Quote
  #3 (permalink)  
Old 02-01-2005, 07:35 PM
Administrator
Site Admin
 
Join Date: Jan 1970
Posts: 43
Rep Power: 10
vivek has disabled reputation
Default

monk is right you need to setup executable permission and scriptalias in httpd.conf here is example:
Code:
ScriptAlias  /cgi-bin/ /home/httpd/vhosts/cyberciti.biz/cgi-bin/
Reply With Quote
  #4 (permalink)  
Old 02-01-2005, 08:21 PM
Junior Member
User
 
Join Date: Jan 2005
Posts: 19
Rep Power: 0
sonaikar
Default

Dear friends,

I have already tried these two solutions. The file is executable and path is given in httpd file(ScriptAlia.

I just want to execute a simple html program stored in cgi-bin file and not perl program.Still it's not working.

I can successfully run the same program if kept in html folder. I know , you cannot believe it. But please try on your machine the same and I am waiting for the reply.
Reply With Quote
  #5 (permalink)  
Old 02-02-2005, 01:33 PM
Administrator
Site Admin
 
Join Date: Jan 1970
Posts: 43
Rep Power: 10
vivek has disabled reputation
Default

No it is not possible to run html from cgi-bin.

All scripts in cgi-bin will be processed by mod_cgi's cgi-script handler.

Generally you kept all server side script in cgi-bin and execute them from other html file. Other option is to generate html code from script itself
Reply With Quote
  #6 (permalink)  
Old 02-04-2005, 05:45 PM
Junior Member
User
 
Join Date: Jan 2005
Posts: 19
Rep Power: 0
sonaikar
Default

Dear sir,

Thanks for your valuable guidance. I have spent my time to check the same for HTML.But no progress.
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 
Thread Tools
Display Modes

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads

Thread Thread Starter Forum Replies Last Post
Script to strip all slack from php, html, js meowing Shell scripting 4 05-03-2008 03:37 AM
A script for Removing all the files inside a folder and its sub folder vivekv Shell scripting 1 10-25-2007 02:44 PM
Perl simple html mail chiku Coding in General 3 08-17-2007 08:59 PM
rsync folder zafar466 Shell scripting 1 04-28-2007 04:28 AM
HTML variable nathan86 Linux software 3 03-23-2005 01:29 PM


All times are GMT +5.5. The time now is 10:58 PM.


Powered by vBulletin® Version 3.7.4 - Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36