You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 9 Next »

Making a File Visible on the Web

Any files that you want visible publicly can be placed on unix under ~/public_html (create the directory if it doesn't exist). This will be visible as a URL like http://www.slac.stanford.edu/~cpo.

Personal Home Pages

There is a template available for more official personal web pages (created by Chip Dalby) that you can get by copying the files in ~cpo/suncat_public_html (including the "images" subdirectory) to a convenient place in your public_html directory. If you put it at the top level, the page will be visible as something like http://www.slac.stanford.edu/~cpo/profile.shtml

If you email cpo, I can add a link to your personal page from the SUNCAT website.

The SUNCAT policy is that each individual who wants one will maintain their own personal page using the style above.

Password Protected Pages

On one of the SLAC unix machines, create a .htpasswd file that will contain your login names and passwords.

cpo@suncatls1 $ cd
cpo@suncatls1 $ htpasswd -c .htpasswd webtest

(use "-c" only for creating your first password)

htpasswd will prompt you (twice) to input the password for the login name "webtest".

Create a subdirectory that you want to protect under ~/public_html. Put two files there:

The .shtaccess should contain:

AuthUserFile /afs/slac/u/if/cpo/.htpasswd
AuthName "Enter userid and password"
AuthType Basic

<LIMIT GET>
require user webtest
</LIMIT>

NOTE: Edit two lines in .shtaccess: pathname of .htpasswd and the "require user" line with the appropriate username

The .htaccess file should contain (this does not have to be editted):

RewriteEngine On
RewriteCond %{SERVER_PORT} !^443$
RewriteRule ^.*$ https://%{SERVER_NAME}%{REQUEST_URI} [L,R]
  • No labels