LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   Need help with CGI scripts for default directory path for website in Perl 5.8.8 (https://www.linuxquestions.org/questions/programming-9/need-help-with-cgi-scripts-for-default-directory-path-for-website-in-perl-5-8-8-a-744492/)

chilali 08-02-2009 05:54 AM

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!

Thanks.
Mia

theNbomr 08-02-2009 10:55 AM

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.

chilali 08-02-2009 11:39 AM

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.py
index.htaccess
XXXXX.py (that creates yourscript.cgi)
yourscript.cgi or yourscript.pl
/*<--whatever I am missing to get me to here --> :confused:
index.html


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

This is what I need help with!

Mia

chrism01 08-03-2009 12:20 AM

Try this: http://httpd.apache.org/docs/2.0/howto/cgi.html

chilali 08-03-2009 06:30 AM

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.

Mia


All times are GMT -5. The time now is 01:14 PM.