Page 1 of 1

Running a PERL script on hosted webspace

Posted: Sun Jun 19, 2011 9:22 pm
by ercatli
Hi! I am new to hosted webspace, but I note PERL is part of the software available. I want to run a Google Sitemap generator in PERL. I have the file, just have to modify it, upload it then run it. But I have 2 questions please ....

1. I have to include in the sample PERL script the paths and filenames for my installation (obviously). The Google instructions give the following sample code:
<directory path="/var/www/icons" url="http://www.example.com/images/" />
then explain:
Ensure that path value is the complete path to the directory on your web server. Ensure that the url value is the complete URL
Obviously I know the URL, but I don't understand what they mean by the directory path. If it is the full directory path from the top, then obviously I don't know it and shouldn't know it. So I assume it is the directory path from the point where I login using SSH, or something? Can anyone explain please?

2. I don't know how to run the PERL script. I understand how to FTP the files to my webspace, and I understand it will require using SSH which will be just like using Terminal on my Mac to run a script, but I don't know how to run the script on the Exetel server. I'm guessing there is a password and username, or whatever, but I don't recall being told that. Can anyone help me out on this too please?

Thanks.

Re: Running a PERL script on hosted webspace

Posted: Mon Jun 20, 2011 8:54 am
by lingg
Place the script in directory 'cgi-bin' should do it, are you using paid hosting or the free web space?

for free web hosting, it should be: public_html/cgi-bin
fro paid web hosting, it should be: web/www.example.com/cgi-bin

Re: Running a PERL script on hosted webspace

Posted: Mon Jun 20, 2011 9:20 am
by ercatli
Thanks for replying. It is paid hosting, but I still don't know the answer to my questions, and you have in fact raised another question (sorry).

1. What do I tell Google is the path?

2. How do I get into the webspace with SSH to run the PERL script (what password, etc)?

3. I am aware I have a cgi-bin folder. The structure of my webspace is:

my root (dunno what its called)
web
URL name
cgi-bin
public_html
website index file
rest of webpages

Now when anyone types the URL, they go to the webpages in public_html. That doesn't seem to gel with the paths you have given. Can you explain further please?

Thanks.

Re: Running a PERL script on hosted webspace

Posted: Mon Jun 20, 2011 9:35 am
by lingg
for eg, if you upload a script as below:

web/www.example.com/cgi-bin/aaa.pl
Then you can run it by visiting URL: web/www.example.com/cgi-bin/aaa.pl

If you have any problem, please PM your service number and website name.