Difference between revisions of "Setting Up CGI Scripts on the CS Webservers"
Line 5: | Line 5: | ||
''(Note: Your cgi-script should reside in your public_html/cgi-bin directory.)'' | ''(Note: Your cgi-script should reside in your public_html/cgi-bin directory.)'' | ||
− | On the CS Grad Net: | + | On the CS ''Grad'' Net: |
<pre> | <pre> | ||
Line 11: | Line 11: | ||
</pre> | </pre> | ||
− | On the CS Ugrad Net: | + | On the CS ''Ugrad'' Net: |
<pre> | <pre> |
Revision as of 20:49, 30 July 2013
Calling up your CGI script
To call up your cgi-script via a web browser, use the following format (replace “username” with your username and “test.pl” with your perl script name.)
(Note: Your cgi-script should reside in your public_html/cgi-bin directory.)
On the CS Grad Net:
http://www.cs.jhu.edu/cgi-bin/cgiwrap/username/test.pl
On the CS Ugrad Net:
http://ugradcs.jhu.edu/cgi-bin/cgiwrap/username/test.pl
Creating your first CGI script
CS Faculty, Grad Students, Staff, Researchers and Post Docs: Log into one of the CS Grad Net Linux machines.
CS Ugrad Students: Log into one of the CS Ugrad Net Linux machines.
mkdir ~username/public_html/cgi-bin
chmod 705 ~username/public_html/cgi-bin
cd ~username/public_html/cgi-bin
Create your cgi/perl script in the cgi-bin directory.
Make sure the top line of your perl script says:
#!/usr/local/bin/perl
Save your perl script.
chmod 704 test.pl (replace the name “test.pl” with your script name.)