Difference between revisions of "Creating a Personal Webpage"

(36 intermediate revisions by 4 users not shown)
Line 1: Line 1:
(You will need to be connected to one of the CS Linux or Solaris machines. )
+
==INTRO==
  
NOTE:  where you see “username”, replace that with your username.)
+
CS users may create webpages on our www.cs.jhu.edu or www.ugrad.cs.jhu.edu web servers.
  
ssh into one of our [[Linux Clients|Linux]] or Solaris machines
+
===NOTES:===
 +
:*  To make a webpage on our web servers, ''you must have a [[Obtaining_CS_Computer_Accounts|CS Linux account]]''.
 +
:**CS Grad Net account required for the main CS webserver.
 +
:**CS Ugrad Net account required for the Ugrad webserver.
  
chmod 701 ~username            (don’t forget the ~ )
+
:* <span style="color:#ff0000"> CS IT does '''not''' create or edit webpage content for users. You are responsible for your own website design and troubleshooting.</span>
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:
 
  
<html>
+
== Accessing Your Webpage ==
<head>
+
 
<titleTitle of my webpage </title>
+
NOTE: Where you see "''account''", replace that with your CS account name.
</head>
+
 
                        <body>
+
* On the CS '''''Grad/Research''''' net, use <tt><nowiki>http://</nowiki>www.cs.jhu.edu/~''account''</tt> or <tt><nowiki>http://</nowiki>cs.jhu.edu/~''account''</tt>
                                    This is a test!
+
 
                        </body>
+
* On the CS '''''Ugrad''''' net, use <tt><nowiki>http://</nowiki>www.ugrad.cs.jhu.edu/~''account''</tt> or <tt><nowiki>http://</nowiki>ugrad.cs.jhu.edu/~''account''</tt>
            </html>
+
 
 +
== Making a Basic Homepage ==
 +
 
 +
<code>ssh</code> into one of our [[:Category:Linux Clients | Linux clients]].
  
Save and exit from your editor.
+
chmod 0701 ~                  # That's a tilde at the end of the command.
chmod 704 index.html
+
mkdir ~/public_html          # This directory might already exist.  If so, do not delete its contents.
 +
chmod 0701 ~/public_html
 +
cd ~/public_html
  
Now check your work. Does it work?  To check:
+
Edit <tt>index.html</tt> with your favorite editor.
On the GRAD network, use  http://www.cs.jhu.edu/~username
+
Follow the template below for your <tt>index.html</tt> file:
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.
+
<pre>
  Please be very careful changing your top-level home directory permissions.
+
<html>
 +
    <head>
 +
        <title> Title of my webpage </title>
 +
    </head>
 +
    <body>
 +
        <h1> Title of my webpage </h1>
 +
        <p> This is a test! </p>
 +
    </body>
 +
</html>
 +
</pre>
  
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 .
+
Save and exit from your editor.
Setting up CGI scripts
 
  
mkdir ~username/public_html/cgi-bin
+
  chmod 0604 index.html
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.)
+
Now check your work.  Visit your webpage as described in [[#Accessing your webpage|Accessing your webpage]], above.
  
If your cgi-script is on the GRAD network: http://www.cs.jhu.edu/cgi-bin/cgiwrap/username/test.pl
+
If you add more pages, please make sure they all have the appropriate permissions, as described in [[File Permissions for Webpages]]. That link is a useful resource any time you get a "permission denied" error when trying to access your webpage.
  
If your cgi-script is on the UGRAD network:  http://ugrad.cs.jhu.edu/cgi-bin/cgiwrap/username/test.pl
+
== Other Issues ==
  
+
If you need additional help, please e-mail [mailto:support@cs.jhu.edu CS IT Support] with a complete description of your problem.
  
If you have further issues, please e-mail the webmaster with a complete description of your problem.
+
[[Category:Webpages and Webservices]]

Revision as of 16:46, 6 January 2022

INTRO

CS users may create webpages on our www.cs.jhu.edu or www.ugrad.cs.jhu.edu web servers.

NOTES:

  • To make a webpage on our web servers, you must have a CS Linux account.
    • CS Grad Net account required for the main CS webserver.
    • CS Ugrad Net account required for the Ugrad webserver.
  • CS IT does not create or edit webpage content for users. You are responsible for your own website design and troubleshooting.

Accessing Your Webpage

NOTE: Where you see "account", replace that with your CS account name.

  • On the CS Grad/Research net, use http://www.cs.jhu.edu/~account or http://cs.jhu.edu/~account
  • On the CS Ugrad net, use http://www.ugrad.cs.jhu.edu/~account or http://ugrad.cs.jhu.edu/~account

Making a Basic Homepage

ssh into one of our Linux clients.

chmod 0701 ~                  # That's a tilde at the end of the command.
mkdir ~/public_html           # This directory might already exist.  If so, do not delete its contents.
chmod 0701 ~/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 0604 index.html

Now check your work. Visit your webpage as described in Accessing your webpage, above.

If you add more pages, please make sure they all have the appropriate permissions, as described in File Permissions for Webpages. That link is a useful resource any time you get a "permission denied" error when trying to access your webpage.

Other Issues

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