Ask SIPB - March 21, 2003

MIT offers many options for viewing and publishing material on the web. This week, we will first answer an unrelated (but timely) question, and explore two of MIT's most frequently used web servers, and

Question: How can I check my email over Spring Break?

Answer: The easiest way is to use This will work from anywhere in the world.

Question: What is the difference between and, and why do I have to care?

Answer: is run by MIT Information Systems, while 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:
Athena lockers have the same pattern: for example and 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 provides more bandwidth internally to MIT.

Question: Can I password protect part of my MIT website?

Answer: Yes. and offer two ways of restricting who can view a page. 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, they will get "Forbidden". Accessing the same page via, the browser will prompt for a username and password. The directions and caveats for setting up password protection are given at An example password-protected page is The username is "foo" and the password is "bar". 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

Question: How can I set the MIME-type of a file I serve from the MIT webservers?

Answer: If you access a webpage through, you can set the MIME types in a .htaccess file. On, 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 An example is shown at Note that the example does not work when the same page is accessed at

Question: How can I serve large files fast from the MIT webservers?

Answer: Use if the intended audience is within MIT. For connections within campus, has greater bandwidth than Note however, for people viewing from the outside world, both servers have the same bandwidth.

Question: Can I host my own domain ( at MIT?

Answer: Sort of. For a price, you can have a domain be redirected to an MIT webpage. Note that you may not use any web server at MIT for running a business. (See

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 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 The browser handles this automatically and displays the MIT-hosted web page.

An example page which does this is If you type in this URL, you will be automatically redirected to Tao Yue's MIT homepage (thanks Tao!).

Question: How do I prevent web users from seeing the list of files in my home directory?

Answer: You may have discovered that anyone can list the files in your Athena home directory via 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.

Question: Are SSI, CGI, PHP, or server logs available?

Answer: Both and 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

Other CGI programs are listed at For security reasons, neither nor, 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 nor

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 In MIT labs and offices, policies about web servers vary.

You can obtain limited information about visitors to your and web pages. For details, see

To ask us a question, send email to We'll try to answer you quickly, and we can address your question in our next column. You can also stop by our office in W20-557 or call us at x3-7788 if you need help. Copies of each column and pointers to additional information are posted on our website: