web.mit.edu
and www.mit.edu
, and why do I
have to care?web.mit.edu
is run by MIT Information
Systems, while www.mit.edu
is run by us (SIPB). They are
approximately equally reliable, and (for personal homepages) you can
access the same page through both servers. However, the same page
has slightly different addresses between the servers. For a personal
homepage stored in your Athena account, the addresses are:
http://web.mit.edu/yourname/www/and
http://www.mit.edu/~yourname/Athena lockers have the same pattern: for example http://web.mit.edu/6.170/www/ and http://www.mit.edu/~6.170/ are the same page of the class (and locker) 6.170. Many people prefer the "www" address because it is slightly shorter to type.
Other differences are that servers have different features (two of which are covered below), and web.mit.edu provides more bandwidth internally to MIT.
www.mit.edu supports password protection, that is, anyone on the internet who knows the username and password can access a password-protected page. If someone trys to access the password-protected page via web.mit.edu, they will get "Forbidden". Accessing the same page via www.mit.edu, the browser will prompt for a username and password. The directions and caveats for setting up password protection are given at http://www.mit.edu/faq/password.html. An example password-protected page is http://www.mit.edu/~asksipb/password. The username is "foo" and the password is "bar".
web.mit.edu supports securing web pages with MIT certificates. You can restrict who the people who can view a page to MIT users and groups of MIT users. Unfortunately, a certficate-protected page cannot be viewed by someone without an MIT username. The directions for setting up certificate-protected pages are given at http://web.mit.edu/cwis/web/htaccess-usage.shtml.
www.mit.edu
, you can set the MIME types in a
.htaccess
file. On web.mit.edu
, the web server
sets the MIME type to a value that's usually correct, but there's no
way to override it.
.htaccess
is a short text file
with a line
beginning with AddType, then the MIME type, then has the filename
extension. For example, suppose you wanted to use the MIME type
image/jpeg for any filename ending with ".fire". The file .htaccess
would have
AddType image/jpeg fire
This assigns the image/jpeg MIME type to any ".fire" files stored
in same Athena directory as the .htaccess file, or stored in
subdirectories below that directory. For more details, see
http://www.mit.edu/faq/mimetypes.html.
An example is shown at
http://www.mit.edu/~asksipb/mime/. Note that the example does not work when the same page is accessed at
http://web.mit.edu/asksipb/www/mime/
web.mit.edu
if the intended audience is within
MIT. For connections within campus, web.mit.edu
has greater
bandwidth than www.mit.edu
. Note however, for people
viewing from
the
outside world, both servers have the same bandwidth.
Google for "domain redirect" and you will find a variety of domain-registering companies supporting URL redirection (also called URL forwarding). Prices vary, but there are some registrars who provide domains and reliable URL redirection for $10/year.
Here's how it works. Someone types http://www.mycoolname.com/ in their web browser. The web request first goes to a web server that's operated by the registrar. Their web server sends a "redirect" to tell the browser to go to the new URL http://web.mit.edu/yourname/www/. The browser handles this automatically and displays the MIT-hosted web page.
An example page which does this is taoyue.com. If you type in this URL, you will be automatically redirected to Tao Yue's MIT homepage (thanks Tao!).
http://web.mit.edu/yourname/
. The contents of the
files themselves won't be viewable, but the names will. If you are
concerened about this, do
athena% touch ~/index.html
If you're especially concerned about someone seeing the names of
the files in your home directory, you should move those files to
your Private directory. Then, they won't even be listable even by someone
who logs into Athena and looks in your home directory in AFS.
web.mit.edu
and
www.mit.edu
support Server-Side Includes (SSI). This
allows you to create .shtml
files, which can specify some
details of constructing a web page (e.g., pages that include a common
header or footer).
The most commonly used CGI (Common Gateway Interface) program at MIT is the one for e-mail forms. You can design your own arbitrary forms -- a typical example is collecting names, addresses, and requests or problem reports. When someone clicks the "Submit" button, the information the person entered is e-mailed to you. For more details, see http://web.mit.edu/cwis/faq/forms.html.
Other CGI programs are listed at http://web.mit.edu/cwis/. For
security reasons, neither
web.mit.edu
nor www.mit.edu
, allow
you to create your own CGI programs. The only CGI programs available
are those the server
administrators have installed.
PHP (a "hypertext preprocessor") is similar to SSI and
CGI. Unfortunately, it is not
available on web.mit.edu
nor www.mit.edu
.
If you have a computer at MIT, you may be able to run a web server that supports CGI, PHP, or corresponding Microsoft technologies such as ASP.NET. Web servers are allowed on student machines -- you probably want a static IP address (which dorm residents often don't have, but can get via http://rcc.mit.edu/). In MIT labs and offices, policies about web servers vary.
You can obtain limited information about visitors to your
web.mit.edu
and
www.mit.edu
web pages.
For details, see http://web.mit.edu/is/help/web-reporting/.