You are here: GSI Wiki>Linux Web>WebDocs (2016-01-22, StefanHaller)EditAttach

User web pages on web-docs.gsi.de

As a Linux user at GSI you may distribute your own web pages on web-docs.gsi.de. The pages will be available world-wide as http://web-docs.gsi.de/~userid/.

This location corresponds to the web-docs/ subdirectory in your home directory (/u/userid/ or /misc/userid/), which is in fact a symlink to /WWW/userid/ that is in turn auto-mounted from the corresponding NFS server.

When you put a html file called index.html in this directory, it will be automatically accessible as http://web-docs.gsi.de/~userid/.

A good online reference for HTML is http://www.selfhtml.org/ (available in German, French, Spanish and Japanese, but only partly in English).

Windows users may access the Linux web-docs/ folder via Samba as //samba.gsi.de/web-docs (see SambaConnection).

Usage notes

  • For stability reasons no central FileSystems are accessible from the web server.
  • Quotas: the size limit for each individual web-docs is 3 GiB.

CGI scripts

You may put shell, perl or python scripts or even binary executables inside your web-docs. These scripts will be executed by the web server as long as they have a .cgi, .pl or .py extension and have proper permissions:
  • file must be executable
  • file must not be writable to anyone but the owner
  • also the containing directory must writable fro the owner exclusively.

The scripts will be executed with the privileges of the account they belong to. There's a 5 minute limit on the total CPU usage for each script (as we had some nasty infinite loops in the past).

PHP

You can put PHP files in your web-docs. They will be run with the your own privileges like other CGI scripts.

Restricting HTTP access to your web-docs

You can restrict the access to your web-docs via .htaccess files - webserver config sniplets that apply to the directory they reside in and its subdirectories.

Limiting access by IP

To limit the access to your web-docs to GSI machines put this into your .htaccess

Order deny,allow
Allow from .gsi.de
Deny from All

Add authentication to your web-docs

Put this in our .htaccess

AuthType Basic
AuthName "Descriptive text shown in the authentication dialog"
AuthUserFile .htpasswd
Require valid-user

Then create the password file .htpasswd in the same directory with htpasswd -c .htpasswd username. You'll be prompted for the password.

For further information please have a look at http://httpd.apache.org/docs/current/howto/auth.html

-- ChristopherHuhn, StefanHaller - 2005 - 2014
Topic revision: r10 - 2016-01-22, StefanHaller