Skip to main content
Department of Information Technology

HTTP servers

We provide a number of HTTP servers for the official department website, separate websites for entities and projects affiliated with the department, and personal web pages for staff and students.

Personal web pages

You may create your own public web pages, with http://user.it.uu.se/~username/ for an address. See instructions below.



How it works

You must have an account in the department Unix environment (Solaris and GNU/Linux). Put the code for your first page in a file named index.html in your public_html subdirectory to your home directory. The URL will be http://user.it.uu.se/~username/ where username is your username in the Unix systems.

Character set

Default character set is UTF-8. To avoid problems use HTML entities for non ASCII characters.

To convert html-files encoded with Latin-1 (ISO8859-1) to html-entities you can use the following command:

recode -d latin1..html < OLD.html > NEW.html

If the file contains Windows-styled line breaks, the following command will probably be better:

cat OLD.html | dos2unix -ascii | recode -d latin1..html > NEW.html

Multiple language versions of a file

Each language version is indicated by an ISO language code extension, which appear after the .html extension (for example index.html.sv, index.html.en). Supported codes.

Password protected pages

If you have web pages that you don't want to be accessible for everyone, you can password protect them.

  1. Create a password file with users and passwords and save it somewhere outside the public_html subdirectory:
    • Type the command
      htpasswd -c passwdfile username1 (for example htpasswd -c /home/karolina/wwwpwd santa)
      This creates the password file with username1 in it (it prompts for a password for that username).
    • To change a password for an existing user in the password file, type
      htpasswd passwdfile username1
    • To add a username to your already existing password file , type
      htpasswd passwdfile username2
  2. Create the file .htaccess in the directory where you want to protect the webpages. All pages in the directory and in all its subdirectories will be protected. Put these lines in the file:

    AuthUserFile passwdfile
    AuthName "greeting text"
    AuthType Basic
    require valid-user

    Please notice the " " around the greeting text (not needed if it contains a single word).

CAS authentication through .htaccess

Create the file .htaccess in the directory where you want to protect the webpages with CAS authentication. All pages in the directory and in all its subdirectories will be protected. Put these lines in the file:

AuthType CAS
require valid-user

CGIWrap

To set up your own executable programs and have the HTTP server run them via CGIWrap, place them in public_html/cgi-bin in your home directory. Then access them via http://user.it.uu.se/cgi-bin/cgiwrap/username/program. Extra path elements (delimited by "/") and query parameters ("?") can be added after the program name, and will be passed to your CGI process via environment variables.

Use the corresponding CGIWrapd address http://user.it.uu.se/cgi-bin/cgiwrapd/username/program to obtain diagnostic messages while running your program.

Since cgi-bin is located in your public_html directory tree, its contents will be directly visible (without executing the programs) to anybody accessing it, unless you use .htaccess to limit access. To prevent HTTP clients from reading and displaying your CGI program files directly, put the following in a file public_html/cgi-bin/.htaccess (also relative to your home directory):

deny from all

The .htaccess file will not affect execution of your programs via cgiwrap. If execution of your CGI programs is to be limited, those restrictions must be implemented by the programs themselves.

While developing your CGI program it is quite likely that you will get an error message: "Internal Server Error". This is almost exclusively caused by an error in your program, and not a problem with the server itself. Try using cgiwrapd as described above to spot the error.

SSI parsing

The HTTP server will parse files for SSI directives if they have the execute bit set (for example chmod +x pagename.html). Files with the extension .shtml (with or without the execute bit set) will also be parsed.

PHP modules

Information about installed modules

Updated  2013-06-19 16:20:37 by Joel Fredrikson.