Line: 1 to 1 | ||||||||
---|---|---|---|---|---|---|---|---|
Nevis Web Setup Guide | ||||||||
Line: 30 to 30 | ||||||||
cp ~seligman/WWW/sample.html . | ||||||||
Changed: | ||||||||
< < | Edit these files with your favorite text editor. Emacs![]() | |||||||
> > | Edit these files with your favorite text editor. Emacs![]() | |||||||
ends in ".html". If you type C-h m while editing an HTML file, you'll see a description of the special features of this mode. (On the Mac, I used the free version of BBedit![]() Viewing your web pages | ||||||||
Line: 39 to 39 | ||||||||
HTML files. For example, after you've copied template.html to your area, you can
see how it looks by telling your browser to look at the URL: | ||||||||
Changed: | ||||||||
< < | http://www.nevis.columbia.edu/~jsmith/template.html![]() | |||||||
> > | https://www.nevis.columbia.edu/~jsmith/template.html![]() | |||||||
assuming that your login ID is jsmith. Note that you do not type in | ||||||||
Line: 62 to 62 | ||||||||
If you do so, then you can omit the file name when you tell other people the URL of your home page: | ||||||||
Changed: | ||||||||
< < | http://www.nevis.columbia.edu/~jsmith/![]() | |||||||
> > | https://www.nevis.columbia.edu/~jsmith/![]() | |||||||
If you're having problems creating or changing your web pages, check out the | ||||||||
Line: 85 to 85 | ||||||||
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![]() ![]() Other examples | ||||||||
Changed: | ||||||||
< < | 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![]() | |||||||
> > | 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![]() | |||||||
cp ~zajc/WWW/index.html ~/WWW/zajc.html | ||||||||
Line: 107 to 107 | ||||||||
Let the sysadmin knowAfter you've set up your web site, be sure to tell the | ||||||||
Changed: | ||||||||
< < | webmaster![]() ![]() | |||||||
> > | webmaster![]() ![]() | |||||||
Obfuscate e-mail addressesIt's a bad idea to include your e-mail address directly as part of your web site. | ||||||||
Line: 124 to 124 | ||||||||
Instead, use this:
Send e-mail to | ||||||||
Changed: | ||||||||
< < | John Smith | |||||||
> > | John Smith | |||||||
On your web page, this will look like: "Send e-mail to | ||||||||
Changed: | ||||||||
< < | John Smith![]() | |||||||
> > | John Smith![]() | |||||||
If you click on this link, it will display a warning page stating that the e-mail address is not to
be used for advertising. Also, your e-mail address is less likely to be picked up by an
automated program.
man pages | ||||||||
Changed: | ||||||||
< < | Any Nevis man![]() ![]() | |||||||
> > | Any Nevis man![]() ![]() | |||||||
Changed: | ||||||||
< < | ls | |||||||
> > | ls | |||||||
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. | ||||||||
Line: 185 to 185 | ||||||||
-rw-r--r-- 1 jsmith collab 5749 May 30 17:35 stuff.html | ||||||||
Changed: | ||||||||
< < | The URL for stuff.html would be http://www.nevis.columbia.edu/~jsmith/descript/stuff.html . | |||||||
> > | The URL for stuff.html would be https://www.nevis.columbia.edu/~jsmith/descript/stuff.html . | |||||||
In this situation, although the Web browser can display index.html and even display the contents of folder "descript", it will return an error when trying to access descript/stuff.html. This problem can be fixed as follows: | ||||||||
Line: 213 to 213 | ||||||||
The trick is to set up a .htaccess file in the directory that you wish to be protected and a .htpasswd file in some other directory. You can find instructions here![]() | ||||||||
Changed: | ||||||||
< < | It's possible that the htpasswd![]() | |||||||
> > | It's possible that the htpasswd![]() | |||||||
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: |
Line: 1 to 1 | ||||||||
---|---|---|---|---|---|---|---|---|
Nevis Web Setup Guide | ||||||||
Line: 102 to 102 | ||||||||
and Java. If a Web page is frame-based, you can view the HTML code that generated the frame itself, but you have to use "Frame Source" to view the HTML that generated the contents within the frame. Some Web pages were created with | ||||||||
Changed: | ||||||||
< < | utilities (such as Microsoft's FrontPage) that don't format the HTML code so | |||||||
> > | utilities (such as Microsoft's FrontPage) that don't format the HTML code so | |||||||
that it can be easily read by human beings.
Let the sysadmin know |
Line: 1 to 1 | ||||||||
---|---|---|---|---|---|---|---|---|
Nevis Web Setup Guide | ||||||||
Line: 211 to 211 | ||||||||
Password protectionHow do I "password protect" a directory so that only people with a password can access the directory with a web browser? | ||||||||
Changed: | ||||||||
< < | The trick is to set up a .htaccess file in the directory that you wish to be protected and a .htpasswd file in some other directory. You can find instructions here![]() | |||||||
> > | The trick is to set up a .htaccess file in the directory that you wish to be protected and a .htpasswd file in some other directory. You can find instructions here![]() | |||||||
It's possible that the htpasswd![]() |
Line: 1 to 1 | ||||||||
---|---|---|---|---|---|---|---|---|
Nevis Web Setup Guide | ||||||||
Line: 31 to 31 | ||||||||
Edit these files with your favorite text editor. Emacs![]() | ||||||||
Changed: | ||||||||
< < | ends in ".html". If you type C-h m while editing an HTML file, you'll see a description of the special features of this mode. (On the Mac, I used the free program TextWrangler![]() ![]() | |||||||
> > | ends in ".html". If you type C-h m while editing an HTML file, you'll see a description of the special features of this mode. (On the Mac, I used the free version of BBedit![]() | |||||||
Viewing your web pages |
Line: 1 to 1 | ||||||||
---|---|---|---|---|---|---|---|---|
Nevis Web Setup Guide | ||||||||
Line: 211 to 211 | ||||||||
Password protectionHow do I "password protect" a directory so that only people with a password can access the directory with a web browser? | ||||||||
Changed: | ||||||||
< < | The trick is to set up a .htaccess and .htpasswd
file in the directory that you wish to be protected. You can find
instructions here![]() ![]() | |||||||
> > | The trick is to set up a .htaccess file in the directory that you wish to be protected and a .htpasswd file in some other directory. You can find instructions here![]() ![]() | |||||||
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: |
Line: 1 to 1 | ||||||||
---|---|---|---|---|---|---|---|---|
Nevis Web Setup Guide | ||||||||
Line: 204 to 204 | ||||||||
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. | ||||||||
Changed: | ||||||||
< < | This policy also applies to any executable scripts in a user's web site, whether in PHP, Perl![]() ![]() ![]() ![]() ![]() | |||||||
> > | This policy also applies to any executable scripts in a user's web site, whether in PHP, Perl![]() ![]() ![]() ![]() ![]() | |||||||
You can still write Javascripts![]() |
Line: 1 to 1 | ||||||||
---|---|---|---|---|---|---|---|---|
Nevis Web Setup Guide | ||||||||
Line: 19 to 19 | ||||||||
Creating your first web page | ||||||||
Changed: | ||||||||
< < | Web pages are created using a language called "HTML" (Hyper-Text Markup Language). There is a wealth of information available on-line to teach you HTML. The guide I most often is w3schools![]() | |||||||
> > | Web pages are created using a language called "HTML" (Hyper-Text Markup Language). There is a wealth of information available on-line to teach you HTML. The guide I most often is w3schools![]() | |||||||
Changed: | ||||||||
< < | Anyone with experience with a document-design language such as LaTeX![]() template.html , is heavily commented and teaches some basic HTML
syntax. The second, sample.html , shows the layout of a simple home page
that was produced by editing template.html. | |||||||
> > | Anyone with experience with a document-design language such as LaTeX![]() template.html , is heavily commented and teaches some basic HTML syntax. The second, sample.html , shows the layout of a simple home page that was produced by editing template.html . | |||||||
To copy these files into your own area, use the following commands: | ||||||||
Line: 32 to 30 | ||||||||
cp ~seligman/WWW/sample.html . | ||||||||
Changed: | ||||||||
< < | Edit these files with your favorite text editor. Emacs![]() | |||||||
> > | Edit these files with your favorite text editor. Emacs![]() | |||||||
ends in ".html". If you type C-h m while editing an HTML file, you'll see a description of the special features of this mode. (On the Mac, I used the free program TextWrangler![]() ![]() Viewing your web pages | ||||||||
Line: 87 to 84 | ||||||||
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![]() ![]() | ||||||||
Changed: | ||||||||
< < | Other examplex | |||||||
> > | Other examples | |||||||
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![]() cp ~zajc/WWW/index.html ~/WWW/zajc.html |
Line: 1 to 1 | ||||||||
---|---|---|---|---|---|---|---|---|
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![]() | |||||||
> > | 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 accountYou 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 beWWW . 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 examplexThe filestemplate.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![]() | |||||||
> > | The Nevis styleIf you want your web page to be in the same style as the main Nevis web site, you have to do the following:
![]() ![]() Other examplexThe filestemplate.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![]() | |||||||
cp ~zajc/WWW/index.html ~/WWW/zajc.html | ||||||||
Line: 104 to 111 | ||||||||
Let the sysadmin knowAfter 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![]() | |||||||
Obfuscate e-mail addressesIt'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![]() ![]() <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![]() ![]() <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 languagesI've created a php![]() | ||||||||
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![]() ![]() ![]() ![]() ![]() | |||||||
> > | 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![]() ![]() ![]() ![]() ![]() ![]() | |||||||
Password protectionHow 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![]() | ||||||||
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 |
Line: 1 to 1 | ||||||||
---|---|---|---|---|---|---|---|---|
Nevis Web Setup Guide | ||||||||
Line: 220 to 220 | ||||||||
The trick is to set up a .htaccess and .htpasswd
file in the directory that you wish to be protected. You can find | ||||||||
Changed: | ||||||||
< < | instructions here![]() | |||||||
> > | instructions here![]() | |||||||
It's possible that the htpasswd![]() |
Line: 1 to 1 | ||||||||
---|---|---|---|---|---|---|---|---|
Added: | ||||||||
> > |
Nevis Web Setup Guide![]() Setting up your accountYou 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 beWWW . If you don't already have such a directory, use the following command to create it:
mkdir -p ~/WWWThe 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 pageWeb pages are created using a language called "HTML" (Hyper-Text Markup Language). There is a wealth of information available on-line to teach you HTML. The guide I most often is w3schools![]() ![]() template.html , is heavily commented and teaches some basic HTML
syntax. The second, sample.html , shows the layout of a simple home page
that was produced by editing template.html.
To copy these files into your own area, use the following commands:
cd ~/WWW cp ~seligman/WWW/template.html . cp ~seligman/WWW/sample.html .Edit these files with your favorite text editor. Emacs ![]() ![]() ![]() Viewing your web pagesYou can use your favorite Web browser to examine the contents of your HTML files. For example, after you've copiedtemplate.html to your area, you can
see how it looks by telling your browser to look at the URL:
http://www.nevis.columbia.edu/~jsmith/template.htmlassuming that your login ID is jsmith. Note that you do not type in the directory name WWW -- the Nevis Web server supplies this automatically. By default, if a Web browser accesses a directory at Nevis but is not supplied with a file name, it will look for a file named index.html .
Once you've created the file that you plan to use for your home page, you
should either rename it:
mv yourhomepage.html index.htmlor link it: ln -s yourhomepage.html index.htmlIf you do so, then you can omit the file name when you tell other people the URL of your home page: http://www.nevis.columbia.edu/~jsmith/If you're having problems creating or changing your web pages, check out the questions below. Additional tipsBetter examplexThe filestemplate.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![]() cp ~zajc/WWW/index.html ~/WWW/zajc.html "Steal" ideas from other web pagesIn general, you can view the HTML source statements for any Web page that you see anywhere on the Internet. If you select "Document Source" from your browser's "View" menu, you will get a window with a listing of the original HTML text that generated the Web page. You can examine the code for tips and tricks, and copy the text from the window into a text editor for your own Web pages. However, not all web pages can be usefully viewed in this way. Many web pages are created using advanced Web server techniques, such as SSI, CGI programs, and Java. If a Web page is frame-based, you can view the HTML code that generated the frame itself, but you have to use "Frame Source" to view the HTML that generated the contents within the frame. Some Web pages were created with utilities (such as Microsoft's FrontPage) that don't format the HTML code so that it can be easily read by human beings.Let the sysadmin knowAfter you've set up your web site, be sure to tell the webmaster![]() Obfuscate e-mail addressesIt's a bad idea to include your e-mail address directly as part of your web site. There are automated programs that scan web sites looking for e-mail addresses to add to mailing lists for unsolicited advertising ("spam![]() Send e-mail to <a href="mailto://jsmith@nevis.columbia.edu">jsmith@nevis.columbia.edu</a>Instead, use this: Send e-mail to <a href="http://www.nevis.columbia.edu/cgi-bin/ewarn.pl?jsmith&nevis.columbia.edu">John Smith</a>On your web page, this will look like: "Send e-mail to John Smith ![]() man pagesAny Nevis man![]() ![]() <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. Problems and QuestionsEdits have no effectI've created a web page and viewed it with a browser. I made a change, then I look at it with the browser again -- but none of my changes have taken effect. Why? The answer is the browser cache. To save time, Web browsers store copies of the most recently-accessed Web pages in a local disk cache. A new version of the same Web page is only reloaded when you explicitly tell the browser to do so. At the top of the browser window is button labeled "Reload". Click this button with the mouse, and the newest version of your Web page will be loaded.Can't see a fileI created a .html file, but when I type in the URL, the Web browser tells me that the file isn't there or that I don't have permission to view it. What's wrong? Here are the things you can check:File permissionsLook at the permissions of the .html file by typingls -l name.html .
A Web browser cannot see the file if it does not have "read" permission for "other"
users. For example (what you'd type is prefixed with # ):
# ls -l *.html -rw------- 1 jsmith collab 5749 May 30 17:31 index.html # chmod +r index.html # ls -l *.html -rw-r--r-- 1 jsmith collab 5749 May 30 17:31 index.htmlThe file index.html did not have read permission for all users, so the Web browser could not see it. Adding read permission to the file fixes the problem. Directory permissionsA more subtle problem is when you put .html files in a sub-directory. For a Web browser to access files within a sub-directory, that directory must have "execute" permission for "other" users. For example:# cd ~jsmith/WWW # ls -l drwxr--r-- 7 jsmith collab 512 May 22 17:33 descript -rw-r--r-- 1 jsmith collab 5749 May 30 17:31 index.html # cd descript # ls -l -rw-r--r-- 1 jsmith collab 5749 May 30 17:35 stuff.htmlThe URL for stuff.html would be http://www.nevis.columbia.edu/~jsmith/descript/stuff.html .
In this situation, although the Web browser can display index.html and
even display the contents of folder "descript", it will return an error when
trying to access descript/stuff.html. This problem can be fixed as follows:
# cd ~/jsmith/WWW # chmod +x descript # ls -l drwxr-xr-x 7 jsmith collab 512 May 22 17:33 descript -rw-r--r-- 1 jsmith collab 5749 May 30 17:31 index.htmlNow the Web browser will be able to access the contents of the "descript" directory. PHP and other scripting languagesI've created a php![]() ![]() ![]() ![]() ![]() ![]() Password protectionHow do I "password protect" a directory so that only people with a password can access the directory with a web browser? The trick is to set up a.htaccess and .htpasswd
file in the directory that you wish to be protected. You can find
instructions here![]() ![]() .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 $HOMEon the Linux cluster to see this path. |