| Web Site Basics |
|
 |
Setting up a web site is very easy but there are a
few pitfalls that every beginner who uses Windows fall into so hopefully
this section will help you either solve them or avoid them. Don't
worry these pitfalls are easily resolved but there are others with
man eating crocodiles or giant wooden spikes at the bottom, some
even have both...ouch!
If you aren't familiar with how to access your account you can just
stop here because your not going to be able to put up a web site
without your web files on the server, that would be like pulling
a rapid out of your hat without the hat.
If you don't know how read the "Account Access" section.
* Remeber to read Website Security so you can secure your homework from others!
|
| |
Homepage Folder |
|
|
| |
First things first. You account homepage files must reside under
a specific folder on your account. This folder is the "public_html" folder
at the root of your account. When you FTP or telnet in you will see
it immediately. All files under this folder can be accessed by the
web if the permissions are set correctly (we'll get to that). So
if you want it on the web it must be in this folder. |
| |
|
| |
How to Access Your Homepage |
|
|
| |
To get to your homepage from the web you simply take the URL of
the server (http://itstudents.ccs.uconn.edu) and tell it to go to
your account folder. So how do you tell it to go to your folder?
Use the "~" along with your account name. So for example
of my account name was group1. Then the homepage for me would be:
http://itstudents.ccs.uconn.edu/~group1
Now this tells it to look in the public_html folder of your account.
Whenever the the URL is pointing to a folder instead of an exact
file the web server will only display one file. This file must be
named "index.html". If there is no file named index.html then the
server can't display anything and you will see an error. This goes
for any folder within your site. So if you have a folder named "computers"
under the public_html folder then the URL:
http://itstudents.ccs.uconn.edu/~group1/computers
Will display the index.html file in the computers folder.
So your starting page
for your web site should be named index.html and placed directly
in the public_html folder. |
| |
|
| |
Pitfall Numeral Uno |
|
|
| |
Remember that those pitfalls I was talking about? Right now I'm
sure several of you are wondering why when they got to your
homepage nothing is being displayed others are wondering why they
see their homepage but images or links aren't working? But the files
are on the server? And there's a file called Index.html. What gives?
Well I'll tell you what gives. You just fell into Pitfall Numeral
Uno. Case sensitivity. On the Windows operating system files are
not case sensitive. So Index.html is the same as index.html or InDex.HTML
for that matter. On the Linux platform everything is case sensitive.
Index.html is not the same file as index.html. Make sure all references
to files are spelled exactly as how they appear on the system. This
includes images too!
If you haven't designed your site yet make sure you keep this in
mind because it can save you some time latter. |
| |
|
| |
Pitfall Numeral Due |
|
|
| |
Hey isn't that supposed to be a Dos? It was if it was
Spanish but its not it's Italian. This brings me to the second pitfall.
What does Italy have to do with getting my web pages displayed
you ask? It has the same bearing on the market value of tea in China
right now. Absolutely nothing.
Ok bad intro but ya know what does have to do with web pages
being displayed properly: Permissions. When you transfer files over
the web server the permissions are automatically set for you so
they can be displayed properly on the web. In some cases the FTP
client your using is changing these. If you can see all your files
your all set. If the files aren't being displayed and case sensitivity
is correct then it is almost sure that the permissions are not set
correctly. In order for the web server to display the files, permission
must be given for anybody to read your file (this includes directories).
There
are three levels of permissions: read, write and execute. There
are also three user types you can grant or revoke permissions to:
owner, group and world. The owner is you. The group is your group
id (ignore this like the red headed step child right now). The last
one is the world or everyone. This is the permission we are interested
in at the moment. The world must be able to read any file and any
folder above it in its tree that you want to display on the web.
So get out your telnet or FTP client and go take a look at your files permissions.
The permissions should be set to 644. The last 4 means that the world can read
the file. If you do not know how to change permissions either read on the web
how to change file permissions for Linux or look in the help section of your
FTP client (most, but not all FTP clients can change files permissions).
Below is a little Permissions calculator. Click the boxes for each level of permission to get the corresponding permission. A value of 644 or higher is needed for web pages to be displayed and a value of 755 is needed for CGI's to run properly on the web.
|