Personal tools
Create your own homepage
Creating web pages in your ICTP account
You can also create a personal homepage. For this purpose, use the
directory named public_html
in your home directory and insert your
html files there. The main page should be called index.html
. Or you just place some files there or in a subdirectory you create to make them downloadable by other people. For this purpose, pay attention to the note on Directory listings below.
You can create html files much like you write a document in Word for Windows by using Netscape: From the file menu, choose New Document.
The URL for your home page will be
http://users.ictp.it/~username/
You can also restrict access to only a few users by creating a text file
named .htaccess
, which must be readable only by you (use the Unix command chmod 600 .htaccess
) and should look like this:
AuthType Basic AuthName Some-name <Limit GET POST OPTIONS PROPFIND> require user username1 username2 username3 </Limit>
In this way, whenever someone tries to access a file in this directory
over the web server, a dialog box will pop up in Netscape or Internet
Explorer asking the user to log in. Only the user names listed in
the .htaccess
file together with the corresponding ICTP passwords
will be accepted.
Instead of writing a list of a few selected ICTP users, you can allow access to
all ICTP users (after authentication) using this require
line:
require valid-user
Another possibility is to set up arbitrary user names and passwords. For
this purpose, set up the .htaccess
file like this:
AuthUserFile /full-path-to-web-dir/.htpasswd AuthName Some-name AuthType Basic require user user1 user2 ...
The .htpasswd
file must look like this:
user1:encrypted-password1 user2:encrypted-password2
To encrypt a password, type in the following in UNIX/Linux:
scs-2.ictp.trieste.it:18> perl print crypt("password","AB"),"\n"; CtrlD
AB
can be replaced by any combination of two letters. You
will get a result like AB8KU4ljUvzmU
which you should copy and
paste into the .htpasswd
file:
user1:AB8KU4ljUvzmU
Directory listings
You can also use a web directory to allow people
to download files, without writing an index.html
file. Whoever
knows the full URL (including the file names) can view or download
the files directly. If you want that Internet users see the file list
of the directory and choose from there the files to download, you must
explicitly tell our web server that this directory should be
listable.
This is done by putting a text file named .htaccess
into this
directory which contains the following line:
Options +Indexes
Whatever you write into a .htaccess
file applies to this directory
and to all sub-directories inside.