Your personal webpages are located in the subdirectory (website) "/home/username/public_html". To protect your webpages in a subdirectory "/home/username/public_html/private" say , follow the steps below:
AuthType Basic
AuthName "YOUR CHOICE HERE"
AuthUserFile /home/loginname/public_html/.htpasswd
require valid-user
You need to replace the string "YOUR CHOICE HERE"
with whatever you want. Replace
"/home/loginname" with your full path to home directory.
To printout your full directory path, Type:
cd ~your-login-name
pwd
"pwd" will print out your full path home directory.
htpasswd .htpasswd login
where "login" is the login name you set for your webpages. This will prompt you for a password for the login. Follow the prompts.
You will then have created a file ".htpasswd"
under "public_html" that has the password encrypted in it.
chmod a+r .htpasswd
chmod a+r private/.htaccess
chmod a+r private
You can use the scripts makethumbs.sh and rotate.sh provided by http://www.molenda.com/makethumbs/. The basic procedure is given below.
~/mytools say,
from http://www.molenda.com/makethumbs/.
chmod +x ~/mytools/*.sh
~/myphoto say. And copy all your jpg files
in this directory. This directory only contains the photos you want to post.
~/myphoto:
~/mytools/makethumbs.sh
~/myphoto/index.html.
That's simple!
Notes:
~/myphoto/description.txt and re-type the
command ~/mytools/makethumbs.sh.
cp photo1.jpg photo1.jpg.bak
cp photo2.jpg photo2.jpg.bak
~/mytools/rotate.sh r photo1 photo2
~/mytools/makethumbs.sh
will rotate photo1.jpg and photo2.jpg anti-clockwise 90 degree.
Since rotate.sh may modify the original file, it's better to make a backup for the
file you want to rotate. You can type
rotate.sh --help
to obtain the usage of the script rotate.sh. The following is the copy of the
usage information:
bash-2.04$ ./rotate.sh --help
Usage: rotate.sh [-p|-o] <-r|-l> file1.jpg file2.jpg file3.jpg ...
-p | --preserve Do not touch original image, even if we can do so safely.
-r | --rotate-right Rotate images to the right (90 deg clockwise)
-l | --rotate-left Rotate images to the left (90 deg counter clockwise)
rotate.sh tries to rotate images losslessly if possible.
Lossless rotation is possible on this system, so it is the default.
You can override this behavior with -o (overwrite) or with -p (preserve)
Filenames can be any unique part of the filename. e.g. if DSCN0532.jpg
exists, 'rotate.sh r 32' will rotate it 90 degrees clockwise.
You can find the latest version of this program at http://www.molenda.com/
This is version v1.22 of rotate.sh.
~/mytools/makethumbs.sh.