Web Pages on ROHAN
After you follow the steps, your homepage url will be http://www-rohan.sdsu.edu/~your_username
Create your web page
You can use a variety of programs to create the webpage.
You must save your webpage as a file called index.html
- If you are writing the html yourself, it is recommended that you use Note Pad for the PC and TextWangler for the Mac.
- Microsoft Word:
- Open MS Word and choose New from the File menu
- Go through the steps to create your webpage with text and pictures
- Click File -> Save as Web Page
- Save as index.html
Create the public_html directory(folder) and set general permissions
You will need to create a directory in your Rohan account to upload your webpage to and set permissions on it so the public can see your page.
Connect to Rohan with:
SSH for PCs
(download SSH here, if needed)
Terminal for Mac OS X, the application is in the Utilities folder. Type ssh -Y username@rohan.sdsu.edu ("username" is your username).
After their password is input correctly, you will see "TERM = (unknown)" Just hit the Return key to get the "rohan%" prompt.
-
Log into your Rohan account
-
Create a "world readable" directory called "public_html"
- rohan% mkdir public_html [press enter]
This command creates the public_html directory
- PERMISSIONS RULES CHANGED FOR NEW ACCOUNTS - **If your ROHAN account was created after January 11, 2008, skip this step.**
(ROHAN accounts created after January 11, 2008 will automatically have permissions for the home and public_html directories set to 711.)
- rohan% chmod 711 . [press enter] (make sure you type the "dot")
This command sets the permissions for your home directory to be publically
readable
- rohan% chmod 711 public_html [press enter]
This command sets the permissions for your public_html directory to be
publically readable
Transferring
files to Rohan
You must transfer ALL files, images, etc. assosiated with your web page.
If you are using a PC you can use a program called SSH (download SSH here, if needed)
to transfer your files to your webpage.
If you are using a Macintosh you can use a program called Fetch.
Using either of these progams will automatically set the permissions for each
transfered file if you have already set the permissons for your
home and public_html directories as stated above under "Create the public_html directory. "
-
Open your file transfer program (either SSH or Fetch)
-
Log into the host name of rohan.sdsu.edu
using your Rohan username and password
-
Transfer your index.html file and any pictures that will go on
your page into your "public_html" directory.
*** Note*** Images and MS Office
files should be transfered in binary mode.
The application should automatically choose "binary" for those types of files, but if you have issues with them, try manually changing the mode to binaray via the menu Remote -> Mode
-
Exit the program
Setting Permissions
for files inside public_html directory
You must manually set the permissions for files that have not been put in the
account via an FTP program (SSH or Fetch) or were uploaded before the permissions were set on the main directory so that other people may view these particular files.
Connect to Rohan with SSH
for PCs or Terminal for Mac
-
Log into your Rohan account through a Telnet session
-
Change to your "public_html" directory by typing at the rohan% prompt:
rohan% cd public_html [press enter]
-
Choose one of the following permission commands depending on the type of file
rohan% chmod 644 file name [press enter]
-
Use this command for .html, .jpg, & .gif files
or
rohan% chmod 755 file name [press enter]
-
Use this command for .cgi & . doc files
-
rohan% logout [press enter]
Adding CGI Scripts
About how to incorporate CGI
scripts into your webpage
Adding a Counter to Your Web Page on ROHAN
To add a counter to your web page, the following code must be located on the
page you wish to count:
<img
src=http://www.sdsu.edu/cgi-bin/nph-counter?url=YOUR_URL&width=5>
Replace "YOUR_URL" with the URL used to access your web page.
Example: < br><imgsrc=http://www.sdsu.edu/cgi/nph-counter?url=http://rohan.sdsu.edu/~jsmith/index.html
&width=5> < p><imgsrc=http://www.sdsu.edu/cgi/nph-counter?url=http://rohan.sdsu.edu/staff/mjones/index.html&width=5>
* YOUR_URL must end with a slash(/), .html, or .htm.
* YOUR_URL must match the URL that is used to access your web page. Don't
guess! Use a web browser (Netscape, Internet Explorer, etc.)to view your page
and see what appears in the Location box.
Student Computing Center
San Diego State University
(619) 594-3189