|
||||||||||
Section ContentsSchool only
|
Personal Web SpaceWeb space is available on the www.geos.ed.ac.uk server to create personal home pages (you need to login to the web site for further instructions when you follow this link). This server uses a content management system called 'zope' together with a set of customised web-page editing tools. Information about these editing tools used is here. Any web page can be connected to your 'official' school page here on request to the Administrative Services Officer). As well as the "normal" School Web server (which hosts this page, for example) we have another web server which is accessible from the outside world. This server is called xweb.geos.ed.ac.uk How To Access Your Xweb Pages From Your Windows Desktop
How To Access Your Xweb Pages From Your Linux Desktop
How To Access Your Xweb Pages From Your Web Browser
Below are more in depth technical notes on xweb
CGI ProblemsIf you are experiencing problems with your CGI scripts there is reference test scripts at these URLs:
For your information the test script starts:
The PHP Script starts: It can't be recommended enough that your scripts should start like this. Many errors will be caught. We are very likely not going to be able to help you unless your scripts start as above. Your scripts's errors will be reported to your error_<your uun>.log in your logs directory. Your scripts have write permissions to the cgi_tmp folder. On xweb this can be found in /opt/x_apache/<uun>/. You also have write access to your public_html folder from your CGI scripts although we recommend that you think carefully before doing this.
Reporting CGI errors
xweb Migrationxweb has been migrated to a new computer with a new operating system. The file space layout has also changed, so has how you access your web files. Before 2007 any files put into your www directory in your home space (or your M: drive if using Windows), or any links to documents outside your www directory would be served to the world. This included any CGI or PHP scripts (if you don't know what a CGI or PHP script is just ignore those sections). This has now changed. Your files are now kept on a separate machine is kept apart from the rest of the School's servers. Each user has a seperate directory in which CGI and PHP scripts can be run called cgi_bin. Apart from one exception all user's existing www folders in their home directories are now symlinks to the new server. Old www folders have been renamed www-old, please check them and remove them at your leasure. If you have an existing www folder then it should by now have been changed to a symlink to /web/<your user name>.
If jsmith1 didn't have a www symlink then he could create one by logging onto his Linux account and issuing this command: ln -s /web/jsmith1 /home/jsmith/www or if you never write scripts and just want to publish static content:ln -s /web/jsmith1/public_html /home/jsmith/www
What does migration mean to me
Site AuthorsSome people use xweb for web sites under domains outside geos.ed.ac.uk, e.g. foo.bar.org. Because your files have moved access to your pages via windows has had to change, the notes below give details for each site's WebMaster as to how to connect now. FSF or EPFSYou can now find your files at \\geosweb1\FsfWebPages, map a network drive to this (note the capitalization).Geophysical Equipment FacilityYou can now find your files at \\geosweb1\GefWebPages, map a network drive to this (note the capitalization).MiomboYou can now find your files at \\geosweb1\MiomboWebPages, map a network drive to this (note the capitalization).
Authentication and Access ControlIf you wish to control access to a directory on your xweb space you can set up a ".htaccess" file. Here is a template:AuthUserFile /opt/x_apache/fgibbins/public_html/sec/.htpasswd So if I had a directory called "sec" in my "public_html" directory that had a password file in it (called .htpasswd) then the directory that I put this .htaccess file in would be protected with those secrets. In other words:
Note that the path in the file starts "/opt/x_apache" not "/web/fgibbins", or in your case "/web/<your uun>". You may access your files from say "/web/<your uun>" but the server that's processing these files thinks they are under "/opt/x_apache" and this file contains instructions for the server. So while the path in the file may look unfamiliar please make sure you put the file itself under "/web/<your uun>/...". Your .htaccess and .htpasswd file must be chmod 755'd. More info here: http://httpd.apache.org/docs/2.0/howto/htaccess.html, and here Auth HowtoGenerating the Secrets for your .htpasswd fileOn our linux systems there is a command (htpasswd(1)) which manages your .htpasswd file. See "man htpasswd" for complete instructions on how to use it. Here is an example of using the htpasswd command to create the password file I mention above using SHA encryption (the -s does this):
htpasswd -s -c /web/fgibbins/public_html/sec/.htpasswd fgibbins Please note that this command uses the path the linux system knows i.e. "/web/fgibbins/...." not the path the web server uses, i.e. '/opt/x_apache/fgibbins/...'
Protecting your files with EASE a.k.a. CosignWARNING: This is advanced usage for advanced users. Here be Dragons!It's also possible to use Cosign: RewriteEngine on File PermisionsIf you're not used to Unix file permisions then trying to get your web page up on xweb can seem fustrating. Getting the balance between having security tight enough not to have our web site hacked into and loose enough to be easily used is difficult. One of the first things that can hinder your web site is your umask. Your public_html directory has the SGID bit set. This means that all files written are owned by the group apache. If your umask restricts the group from reading (or in the case of scripts or directories executing) the files then they won't be read by apache and therefore won't be seen on the web site. For working on the web site a umask of 0027 will do. For scripts apache needs to be able to execute the files. Permisions of "750" will work best. This can be set with the chmod command. The file permission are set after the file contents are copies to the web site. This means that if you run out of room on your web site volunme then the correct permissions will not be set. After asking for your volunme to be extended copying the file over again WILL NOT WORK. Copying a file over agsin just replaces its contents, it doesn't change it's owner. Delete the file before copying it over.
Perl NotesAll our linux systems have extra perl modules installed in /opt/perl to use them please make sure that you have this line at the top of your perl script: use lib qw( /opt/perl ); Or if you'd like to experiment with the cutting edge Mod_Perl distribution: use lib qw( /opt/perl /opt/mod_perl/i386-linux-thread-multi /opt/mod_perl/x86_64-linux-thread-multi ); |
|||||||||
|
© School of GeoSciences ---
Privacy & Cookies ---
Last modified: 26 Nov, 2010 --- Page contact:
|
||||||||||