Jump to main contentmickwood.com - Website Hosting & Design for Christian Organisations
Support

"If we don't know it's broken we can't fix it!"

Support FAQ Homepage

Can't find the answer?

CGI / Perl & Server Side Includes (SSI)

  1. How do I chmod my scripts?
  2. How do I install a Perl module?
  3. How do I prevent other sites from linking directly to files on my web site?
  4. How do I tell the web server to parse my files that include Server Side Includes?
  5. How do I use Server Side Includes?
  6. What is the full path to my site?
  7. What is the location of sendmail?
  8. What is the location of Perl?
  9. What should the file permissions of my CGI/Perl scripts be?
  10. Where is my CGI-BIN?

1. How do I chmod my scripts?

In the File Manager:

  1. Login to your control panel(http://www.yourdomain.com/cpanel)
  2. Click on the "File Manager" icon
  3. Navigate to the directory where the file is located that you want to chmod
  4. Click on the current number in the permissions column (usually 0644)
  5. Click the 'Save' button

In CuteFTP: When connected to your site, right click on the file you want to chmod, click 'CHMOD' from the popup menu, set the permissions and then click 'ok'.

In WS-FTP: When connected to your site, highlight the file, right click the file, select 'CHMOD' from the pop-up menu, select any of the options and click the 'OK' button.

In SmartFTP: When connected to your site, left-click on the file or directory to highlight it. Then right-click and a pop-up menu will appear. Now choose "CHMOD" and type in the number manually or use the check boxes.

Back to top


2. How do I install a Perl module?

Send an email to mick@mickwood.com with your domain name and the Perl module you need to be installed. We will be happy to install the Perl module for you.

Back to top


3. How do I prevent other sites from linking directly to files on my web site?

Overview

HotLink protection prevents other web sites from directly linking to files on your web site. Other sites will still be able to link to any file type that you don't specify below (ie. html files). An example of hotlinking is using a <img> tag to display an image from your site from somewhere else on the net. HotLinking files on your web site ensures that no other site can steal your bandwidth. You should ensure that all sites that you wish to allow direct links from are in the hotlink list. The system attempts add all sites it knows you own to the list, however you may need to add others.

Configure HotLink Protection (in Security section of cPanel)

Steps

  1. Enter all the URLs you are allowing to HotLink to your web site in the "URLs to allow access" text box.

NOTE: If any default URLs should not be entered in the text box, delete them accordingly.

  1. Next, enter file extension types in the "Extensions to allow (separate by commas)" tex box. By default, "jpg,jpeg,gif,png,bmp" are automatically entered.
  2. If someone tries to visit a section on your web site that you have HotLink protected, you can setup a Redirect URL to point them to another location. Enter the URL you want the visitor to be redirected to in the "Url to Redirect to" text box.
  3. If you want to allow direct requests to view image files on your web site, ie. http://www.yourdomain.com/cpanel.gif, click on the Allow direct requests check box.

NOTE: The "Allow direct requests" checkbox must be checked when using HotLink Protection for files that you wish to be viewed in QuickTime (Mac Users) by your site's visitors.

  1. Click on the Submit button. This will save all changes you have made in the steps above.
  2. Enable your HotLink Protection by following the instructions below.

Enabling HotLink Protection

By default, HotLink Protection is disabled. To enable HotLink Protection, click on the Enable button next to "HotLink protection is currently disabled." When the page loads, you will see a confirmation statement.

Back to top


4. How do I tell the web server to parse my files that include Server Side Includes?

Make sure the names of your files end with ".shtml" or ".shtm".

For example:

index.shtml or index.shtm

Back to top


5. How do I use Server Side Includes?

Use the #include directive to include files in your current html documents. The "file=" or "virtual=" elements can both be used.

For example, let's say you were trying to include doc1.html in doc2.html. Both documents exist in a directory called "docdir". Below is the code that you would insert in doc2.html.

File Include Method:

<!--#include file="doc1.html"-->

Virtual Include Method:

<!--#include virtual="/docdir/doc1.html"-->

Back to top


6. What is the full path to my site?

The full path to your site is:

/home/username/public_html

Make sure to replace "username" with your web site username.

Back to top


7. What is the location of sendmail?

The location of sendmail is:

/usr/sbin/sendmail

Back to top


8. What is the location of Perl?

The location of perl is:

/usr/bin/perl

Back to top


9. What should the file permissions of my CGI/Perl scripts be?

Your CGI/Perl scripts should be chmoded to 755 or rwxr-xr-x.

Your CGI/Perl scripts will produce an internal server error, if they are chmoded to anything other than 755 or rwxr-xr-x.

Back to top


10. Where is my CGI-BIN?

A "cgi-bin" has been created for you inside your public_html directory.

You can execute CGI/Perl scripts from any location inside the public_html directory, not just the "cgi-bin".

Back to top


welcome | name | hosting | design | content | promote | update | showcase | support | general information

Showcase Update Promote Content design Hosting Name Welcome