Harvard CS '19. Welcome to my corner of people.fas.harvard.edu
ssh into nice.harvard.edu
Open your terminal (or on Windows, PuTTY) and type the following:
replacing your_harvard_email with whatever you write before @college.harvard.edu. Enter your email password at the prompt, the same one you use to log into computer lab computers.
You're now logged into Harvard's "New Instructional Computing Environment". You're in your home folder, the path of which you can see by typing pwd and hitting enter. You can see the contents of your folder by typing ls, but it doesn't tell you everything. To see hidden files as well as file metadata you can type ls -la.
Your website will be hosted out of a directory called public_html in your home directory. To create that type the following and hit enter:
Now we need to add an index.html file to the public_html folder. Enter the folder by typing
You can create the file using the nano text editor. Type the following to start editing the new index.html file
Enter whatever HTML you like. For example
<title>My cool tilde site</title>
<p>Thanks for visiting my cool tilde site</p>
Exit and save. Type ctrl-x to exit, then 'y' to save, and then enter to confirm the file's name and go back to the terminal prompt.
Right now the only person who can see your files is you. And the administrators of nice.harvard.edu. You need to grant permissions for others to read and execute your public_html folder and its contents. Run the following command
chmod -R a+rX ~/public_html
As described in "Publishing to the World Wide Web",
"chmod" is the Unix command to change file permissions. a+rX means to give all users read and eXecute permissions on these files. The capitalization of the X means that the execute bit will only be set on directories, not files, which is the desired behavior. The -R option means to recursively change permissions on both the directory and all of its subdirectories."
Now run the following command
chmod o+x ~
"Publishing to the World Wide Web" describes this command:
[run this] to grant others the ability to execute your home directory, which is necessary for the web server software to be able to list and open your web files.
Finally run the following command:
According to "Publishing to the World Wide Web",
Fixwebfiles is a special script that exists only on FAS, and which checks the permissions of all files in your web directory and chmods any files which are not public already
Head over to people.fas.harvard.edu/~your_email to see the finished product!