VDS Sphera Knowledge Base

Main / Browse Categories / Perl & CGI / How can I run Perl scripts outside of the cgi-bin directory?

Print article Print Article    Email article Email Article

How can I run Perl scripts outside of the cgi-bin directory?
First, login to your control panel and navigate to:

Domain Settings » Web Aliases

Click the "New Alias" button.

Choose the "Script Alias (CGI executable)" radio button option.

In the "URL path (Alias path name)" text box, enter your URL path. For example, if you want http://yourdomain/mydir/ to run CGI scripts, you would enter this:

/mydir/
In the "Absolute path name" text box, you would enter the full path to this directory. For example:
/var/www/html/mydir/
Note the trailing slashes.

Click "Finish" and your set.

Here is a test CGI script to run to be sure it is working:

#!/bin/perl

print "Content-Type: text/html\n\n";
print "Hello world"
Be sure to chmod 755 the above script before running it in your browser.

User Comments
How can I run Perl scripts outside of the cgi-bin directory?  
There are no user comments for this topic.
 

Attachments
No attachments.

Related Articles
 Where is Perl located on the server?
 Where is the default cgi-bin in my VDS?
 My Perl or CGI scripts are not working, what can I do?
 How do I install Perl Modules using CPAN (Gnu Compiler Collection)?
 How can I avoid being asked to upgrade Perl every time I install a Perl Module?

Why Choose Our Hosting?

  • Unmatched Customer Support!
  • Virtual Private Server technology provides a rich, dedicated-like environment for every account.
  • We are known for our superb quality, performance and flexible hosting environment. We manage the server, software, and network you do the rest.
Continue reading »

Featured Hosting Plan


Learn more about our VPS Extreme

What is Included?

  • PHP 5/MySQL 5
  • Parallels® Plesk Panel 10
  • Unique IP Address
  • Daily VPS Backups (Off Server)
  • SAS Hardware Raid diskspace
  • CentOS 5 x86_64 bit
  • Multi-homed Tier 1 Bandwidth
  • Full Upgrade capabilities
Continue reading »