Difference between revisions of "Creating a Personal Webpage"

Line 1: Line 1:
NOTE:  where you see “username”, replace that with your username.
+
== Making a basic homepage ==
  
ssh into one of our [[:Category:Linux Clients | Linux]] or Solaris machines
+
NOTE: Where you see "''username''", replace that with your username.
  
chmod 701 ~username            (don’t forget the ~ )
+
<code>ssh</code> into one of our [[:Category:Linux Clients | Linux Clients]].
mkdir public_html
 
chmod 701 public_html
 
cd public_html
 
Edit index.html with your favorite editor.
 
Follow the template below for your index.html file:
 
  
 +
chmod 701 ~''username''          # Don’t forget the ~
 +
mkdir public_html            # This directory might already exist.
 +
chmod 701 public_html
 +
cd public_html
 +
 +
Edit <tt>index.html</tt> with your favorite editor.
 +
Follow the template below for your <tt>index.html</tt> file:
 +
 +
<pre>
 
<html>
 
<html>
<head>
+
    <head>
<title> Title of my webpage </title>
+
        <title> Title of my webpage </title>
</head>
+
    </head>
                        <body>
+
    <body>
                                    This is a test!
+
        <h1> Title of my webpage </h1>
                        </body>
+
        <p> This is a test! </p>
            </html>
+
    </body>
 +
</html>
 +
</pre>
  
 
Save and exit from your editor.
 
Save and exit from your editor.
chmod 704 index.html
+
 
 +
chmod 704 index.html
  
 
Now check your work.  Does it work?  To check:
 
Now check your work.  Does it work?  To check:
On the GRAD network, use  http://www.cs.jhu.edu/~username
 
On the UGRAD network, use http://ugrad.cs.jhu.edu/~username  or  http://www.ugrad.cs.jhu.edu/~username
 
  
If you have problems, check your permissions again.
+
* On the GRAD network, use <nowiki>http://</nowiki>www.cs.jhu.edu/~''username''
  Please be very careful changing your top-level home directory permissions.
+
* On the UGRAD network, use <nowiki>http://</nowiki>ugrad.cs.jhu.edu/~''username'' or <nowiki>http://</nowiki>www.ugrad.cs.jhu.edu/~''username''
 +
 
 +
If you have problems, check your permissions again. Please be very careful changing your top-level home directory permissions.
 +
 
 +
If you are a GRAD student and want to update the link to your webpage on the Graduate Students page, please e-mail Cathy Thornton.
 +
 
 +
== Setting up CGI scripts ==
  
If you are a GRAD student and want to update the link to your webpage on the Graduate Students page, please e-mail Cathy Thornton .
+
mkdir ~''username''/public_html/cgi-bin          # This directory might already exist.
Setting up CGI scripts
+
chmod 705 ~''username''/public_html/cgi-bin
 +
cd ~''username''/public_html/cgi-bin
  
mkdir ~username/public_html/cgi-bin
+
Create your cgi/perl script in the <tt>cgi-bin</tt> directory.  
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
 
chmod 704 test.pl            (replace the name “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.)
+
chmod 704 test.pl            # Replace the name "test.pl" with your script name.
  
If your cgi-script is on the GRAD network:  http://www.cs.jhu.edu/cgi-bin/cgiwrap/username/test.pl
+
To call up your cgi-script via a web browser, use the following format (replace "''username''" with your username and "test.pl" with your script name.)
  
If your cgi-script is on the UGRAD network:  http://ugrad.cs.jhu.edu/cgi-bin/cgiwrap/username/test.pl
+
* If your cgi-script is on the GRAD network:  <nowiki>http://</nowiki>www.cs.jhu.edu/~username/cgi-bin/test.pl
 +
* If your cgi-script is on the UGRAD network: <nowiki>http://</nowiki>ugrad.cs.jhu.edu/~username/cgi-bin/test.pl
  
+
== Other issues ==
  
If you have further issues, please e-mail the webmaster with a complete description of your problem.
+
If you need additional help, please e-mail [mailto:support@cs.jhu.edu CS IT Support] with a complete description of your problem.

Revision as of 19:37, 10 October 2013

Making a basic homepage

NOTE: Where you see "username", replace that with your username.

ssh into one of our Linux Clients.

chmod 701 ~username           # Don’t forget the ~
mkdir public_html             # This directory might already exist.
chmod 701 public_html
cd public_html

Edit index.html with your favorite editor. Follow the template below for your index.html file:

<html>
    <head>
        <title> Title of my webpage </title>
    </head>
    <body>
        <h1> Title of my webpage </h1>
        <p> This is a test! </p>
    </body>
</html>

Save and exit from your editor.

chmod 704 index.html

Now check your work. Does it work? To check:

  • On the GRAD network, use http://www.cs.jhu.edu/~username
  • On the UGRAD network, use http://ugrad.cs.jhu.edu/~username or http://www.ugrad.cs.jhu.edu/~username

If you have problems, check your permissions again. Please be very careful changing your top-level home directory permissions.

If you are a GRAD student and want to update the link to your webpage on the Graduate Students page, please e-mail Cathy Thornton.

Setting up CGI scripts

mkdir ~username/public_html/cgi-bin          # This directory might already exist.
chmod 705 ~username/public_html/cgi-bin
cd ~username/public_html/cgi-bin

Create your cgi/perl script in the cgi-bin directory.

chmod 704 test.pl            # Replace the name "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 script name.)

  • If your cgi-script is on the GRAD network: http://www.cs.jhu.edu/~username/cgi-bin/test.pl
  • If your cgi-script is on the UGRAD network: http://ugrad.cs.jhu.edu/~username/cgi-bin/test.pl

Other issues

If you need additional help, please e-mail CS IT Support with a complete description of your problem.