Difference: WebGuide (2 vs. 3)

Revision 32014-06-27 - WilliamSeligman

Line: 1 to 1
 
META TOPICPARENT name="Computing"

Nevis Web Setup Guide

Line: 6 to 6
 
Changed:
<
<
This is a guide on to set up your web site at Nevis Labs. Enough information is provided to get you started.
>
>
This is a guide on how to set up your web site at Nevis Labs. Enough information is provided to get you started.
 
Changed:
<
<
Note that in addition to the "personal web site" approach described below, you can also use this wiki, if you need a shared web site or you just prefer the Wiki approach to website development. (You may notice that some of the Nevis web pages are not moved to the wiki.)
>
>
Note that in addition to the "personal web site" approach described below, you can also use this wiki, if you need a shared web site or you just prefer the Wiki approach to website development. (You may notice that most of the Nevis computing web pages, including this one, were moved to the wiki.)
 

Setting up your account

You need an account on the Linux cluster in order to have a web site at Nevis. All of your web pages must be put within a specific sub-directory of your account. The name of that sub-directory must be WWW. If you don't already have such a directory, use the following command to create it:

mkdir -p ~/WWW 
Changed:
<
<
The only files that viewers will be able to see in your area are those within the WWW directory or in any sub-directories of WWW that you create.
>
>
The only files that viewers will be able to see in your area are those within the WWW directory or in any sub-directories of WWW that you create.
 

Creating your first web page

Line: 74 to 73
 

Additional tips

Changed:
<
<

Better examplex

The files template.html and sample.html are very basic (and somewhat facetious) examples of how to set up a home page. For more serious and professional-looking examples, look at the home pages of some the Nevis faculty, such as Bill Zajc. You can copy these files into your own directory with the commands like:
>
>

The Nevis style

If you want your web page to be in the same style as the main Nevis web site, you have to do the following:

  • In the <head> section, insert the following line:
    <!--#include virtual="/nevis-head.ssi" -->

  • Right after the <body> tag, insert the following line:
    <!--#include virtual="/nevis-body-start.ssi" -->

  • Right before the </body> tag at the end of the file, insert the following line:
    <!--#include virtual="/nevis-body-end.ssi" -->

  • Make the file executable. For example, if your file is index.html, run the following command:
    chmod +x index.html

Note that there's no policy or requirement that your page be in the same style as the Nevis web site. Feel free to define your own styles, write your own server-side includes, or include your own Javascripts.

Other examplex

The files template.html and sample.html are very basic (and somewhat facetious) examples of how to set up a home page. For other examples, look at the home pages of some the Nevis faculty, such as Bill Zajc. You can copy these files into your own directory with the commands like:
 
cp ~zajc/WWW/index.html ~/WWW/zajc.html
Line: 104 to 111
 

Let the sysadmin know

After you've set up your web site, be sure to tell the webmaster
Changed:
<
<
to update the Nevis Contact List with your URL.
>
>
to update the Nevis Directory with your URL.
 

Obfuscate e-mail addresses

It's a bad idea to include your e-mail address directly as part of your web site.
Line: 129 to 136
 automated program.

man pages

Changed:
<
<
Any Nevis man page can be displayed via the web browser. For example, to display the man page on the gv command, use:
<a href="http://www.nevis.columbia.edu/cgi-bin/man.sh?man=gv">gv</a>
This can be handy if you're writing a set of instructions to your students on how to do something in UNIX. Note that this only works for man pages that are available on the web server.
>
>
Any Nevis man page can be displayed via the web browser. For example, to display the man page on the ls command, use:
<a href="http://www.nevis.columbia.edu/cgi-bin/man.sh?man=ls">ls</a>
This can be handy if you're writing a set of instructions to your students on how to do something in UNIX. Note that this only works for man pages that are available on the web server.
 

Problems and Questions

Line: 203 to 205
 

PHP and other scripting languages

I've created a php script for my web site, but it doesn't work. What's wrong?
Changed:
<
<
In Sep-2005 the Nevis web server was hacked due to a user's php script that did not check its inputs carefully enough. Since then, the policy has been to prevent php scripts from running from any user's directory.

This policy also applies to any executable scripts in a user's web site, whether in PHP, Perl, Python, Ruby, Java, or any other form of CGI programming. When properly written, such scripts are secure and highly useful in providing dynamic web content. Unfortunately, there's no easy way for us to guarantee that all users will write secure scripts, and we've made the choice of security over user convenience.

>
>
In Sep-2005 the Nevis web server was hacked due to a user's php script that did not check its inputs carefully enough. Since then, the policy has been to prevent php scripts from running from any user's directory.

This policy also applies to any executable scripts in a user's web site, whether in PHP, Perl, Python, Ruby, Java, or any other form of CGI programming. When properly written, such scripts are secure and highly useful in providing dynamic web content. Unfortunately, there's no easy way for us to guarantee that all users will write secure scripts, and we've made the choice of security over user convenience.

You can still write Javascripts if you choose.

 

Password protection

How do I "password protect" a directory so that only people with a password can access the directory with a web browser?
Line: 224 to 220
  It's possible that the htpasswd command is not available on your machine. If not, let me know and I'll
Changed:
<
<
install it. (It's normally not part of a Linux installation unless the machine is going to host a web server.)
>
>
install it. (It's normally not part of a Linux installation unless the machine is going to host a web server.)
 
Changed:
<
<
Also, as you create your .htaccess file, bear in mind that your home directory is not in /home; it's your home directory as seen by the Linux cluster. Use the command:
>
>
Also, as you create your .htaccess file, bear in mind that your home directory is not in /home; it's your home directory as seen by the Linux cluster. Use the command:
 
# echo $HOME
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2020 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback