#!/bin/sh -x # # create-cert (0775): create a self-signed certificate valid for 10 years # # For a quick guide, see http://www.sendmail.org/~ca/email/other/cagreg.html # openssl req -new -x509 -days 3650 -sha1 -newkey rsa:1024 -nodes \ -keyout server.key -out server.crt chmod 0600 server.key # # Create a htpasswd file # #htpasswd -c /etc/httpd/conf/htpasswd www-user www-pass # # Create corresponding .htpasswd file # #echo AuthName \"WWW authentication\" > /var/www/html/.htpasswd #echo AuthType Basic >> /var/www/html/.htpasswd #echo AuthUserFile /etc/httpd/conf/htpasswd >> /var/www/html/.htpasswd #echo Require valid-user >> /var/www/html/.htpasswd # # For Apache configuration enable htpasswd with # # # AllowOverride AuthConfig #