Visit Jeremy's Blog.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 08-02-2009, 06:54 AM   #1
LQ Newbie
Registered: Aug 2009
Posts: 6

Rep: Reputation: 0
Unhappy Need help with CGI scripts for default directory path for website in Perl 5.8.8

Good Morning everyone!

I really need help. I have been trying to create CGI scripts for a default directory to my website. Basically, I have a Linux based web hosting site, created a domain name and my page reads 'directory has no index file.' The web host site doesn't provide that type of support.

I am a newbie to server side programming, as in three days newbie. I have tried every softwhere-side trick I can think of to do this, including using a remote ftp to try create a shell scripts. That did not work.

I don't understand how this works. Can someone please provide some help with the code I would need to use to make this work?

There are a full list of modules available on the server. I just don't know how to use them. Everything I have been finding on the internet are the files to download Perl which I can't use. I just need to code to write to my /cgi-bin/ to make my site work.

Please help!

Old 08-02-2009, 11:55 AM   #2
LQ 5k Club
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,397
Blog Entries: 2

Rep: Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908
If your web site is hosted by a ISP, then they may not allow access to the cgi-bin (or whatever their site uses) directory. If they do allow users to access a cgi-bin directory, then they probably document the method to use for accessing it.
--- rod.
Old 08-02-2009, 12:39 PM   #3
LQ Newbie
Registered: Aug 2009
Posts: 6

Original Poster
Rep: Reputation: 0
Question Linux Site Administrator help

I am the website administrator. I purchased a domain name and I am hosting that domain but I can't set up the index file. I have never functioned on this side before. I have the directory paths, access to the cgi bins and everything I need. I even tried writing it in .xml, saving it as a .php file and trying to force it to load. That did not work, despite the fact that the hosting site read the .php file for Wordpress and allowed me to load that.

I have done the research for Perl and Python but I have found anything that puts it all together and I know that is what I am missing. What are the scripts that I need to specify the path to my web directory? I know that it is more than one file.
index.htaccess (that creates yourscript.cgi)
yourscript.cgi or
/*<--whatever I am missing to get me to here -->

With the exception of .htaccess, I have no idea what on earth to write in these files.

This is what I need help with!

Old 08-03-2009, 01:20 AM   #4
LQ Guru
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.9, Centos 7.3
Posts: 17,411

Rep: Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397
Try this:
Old 08-03-2009, 07:30 AM   #5
LQ Newbie
Registered: Aug 2009
Posts: 6

Original Poster
Rep: Reputation: 0
Thumbs up Thanks Chris

I noticed people are still reading this post so I wanted to respond. When no one answered the question after a few hours, I began to wonder if I was thinking about the question incorrectly. After searching through pages of error logs, I found my answer. The question that I should have been asking was what SSI commands should I use to create a directory path in Linux.

I read the Apache docs before joining this site but I still didn't understand how to pull it together. I am hosting on fatcow and the site stated you needed to have an .shtml file but I had no idea what to include in the file, like this statement for example:

<!--#exec cgi="cgi-bin/footer.cgi"-->

It took me awhile, but I get it. I had to dump my files and start over but I am getting there. I wanted to post this for the next newbie who is facing the same problem.




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
problems in running cgi/perl scripts... raymond Linux - General 17 02-09-2010 05:06 AM
How to run perl scripts outside cgi-bin? xpucto Linux - Server 3 04-20-2007 03:23 AM
How can I run a perl and cgi scripts in my apache.?. ethnicme Programming 6 07-21-2006 05:02 AM
Of Perl CGI scripts and Sendmail Chrax Programming 2 06-06-2005 05:21 PM
Running Perl/CGI scripts hso_sof Linux - Newbie 3 08-22-2003 11:26 AM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 10:03 PM.

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