Difference between revisions of "Setting Up CGI Scripts on the CS Webservers"

(Created page with ' == 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 p...')
 
 
(25 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 +
== Running your CGI script ==
  
== Calling up your CGI script ==
+
To run your cgi-script via a web browser, use the following format (replace "''username''" with your username and "test.pl" with your script name.)
  
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:
+
* On the CS ''Grad'' Net: <tt><nowiki>http://</nowiki>www.cs.jhu.edu/~''username''/cgi-bin/test.pl</tt>
 +
* On the CS ''Ugrad'' Net: <tt><nowiki>http://</nowiki>www.ugrad.cs.jhu.edu/~''username''/cgi-bin/test.pl</tt>
  
<pre>
+
== Creating Your First CGI Script ==
              ''http://www.cs.jhu.edu/cgi-bin/cgiwrap/username/test.pl''
 
</pre>
 
  
On the CS Ugrad Net:
+
''CS Faculty, Grad Students, Staff, Researchers and Post Docs:  Log into one of the [[Linux Clients on the CS Grad/Research Net|CS Grad Net Linux machines]].''
  
<pre>
+
''CS Ugrad Students:  Log into one of the [[Linux Clients on the CS Undergrad Net|CS Ugrad Net Linux machines]].''
  
  ''http://ugradcs.jhu.edu/cgi-bin/cgiwrap/username/test.pl''
+
  cd ~/public_html/cgi-bin
  
</pre>
+
Create your CGI script in the <tt>cgi-bin</tt> directory.
 +
 
 +
chmod 704 test.pl            # Replace the name "test.pl" with your script name.
 +
 
 +
'''Note:''' If you're not sure what your public_html/cgi-bin folder permissions need to be, please visit:  [[File Permissions for Webpages]]
 +
 
 +
 
 +
[[category:Webpages and Webservices]]

Latest revision as of 18:37, 25 March 2022

Running your CGI script

To run your cgi-script via a web browser, use the following format (replace "username" with your username and "test.pl" with your 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/~username/cgi-bin/test.pl
  • On the CS Ugrad Net: http://www.ugrad.cs.jhu.edu/~username/cgi-bin/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.

cd ~/public_html/cgi-bin

Create your CGI script in the cgi-bin directory.

chmod 704 test.pl            # Replace the name "test.pl" with your script name.

Note: If you're not sure what your public_html/cgi-bin folder permissions need to be, please visit: File Permissions for Webpages