To install the webface authentication module, create the necessary directory structure in /var/www/, copy the component files, and set the appropriate permissions for CGI scripts and static assets.
1. Create directories
mkdir -p /var/www/cgi-bin /var/www/assets/css /var/www/assets/js
2. Place files
Copy the following files to /var/www/:
index.html $\rightarrow$ /var/www/index.htmllogin.html $\rightarrow$ /var/www/login.htmlassets/css/webface.css $\rightarrow$ /var/www/assets/css/webface.cssassets/js/login.js $\rightarrow$ /var/www/assets/js/login.jscgi-bin/auth_common.sh $\rightarrow$ /var/www/cgi-bin/auth_common.shcgi-bin/auth.cgi $\rightarrow$ /var/www/cgi-bin/auth.cgicgi-bin/index.cgi $\rightarrow$ /var/www/cgi-bin/index.cgicgi-bin/logout.cgi $\rightarrow$ /var/www/cgi-bin/logout.cgicgi-bin/session_guard.sh $\rightarrow$ /var/www/cgi-bin/session_guard.sh
3. Set permissions
chmod 755 /var/www/cgi-bin/auth.cgi /var/www/cgi-bin/index.cgi /var/www/cgi-bin/logout.cgi
chmod 644 /var/www/cgi-bin/auth_common.sh /var/www/cgi-bin/session_guard.sh
chmod 644 /var/www/index.html /var/www/login.html /var/www/assets/css/webface.css /var/www/assets/js/login.js
# Create target directories
mkdir -p /var/www/cgi-bin /var/www/assets/css /var/www/assets/js
# Place files
cp index.html /var/www/index.html
cp login.html /var/www/login.html
cp assets/css/webface.css /var/www/assets/css/webface.css
cp assets/js/login.js /var/www/assets/js/login.js
cp cgi-bin/auth_common.sh /var/www/cgi-bin/auth_common.sh
cp cgi-bin/auth.cgi /var/www/cgi-bin/auth.cgi
cp cgi-bin/index.cgi /var/www/cgi-bin/index.cgi
cp cgi-bin/logout.cgi /var/www/cgi-bin/logout.cgi
cp cgi-bin/session_guard.sh /var/www/cgi-bin/session_guard.sh
# Set permissions
chmod 755 /var/www/cgi-bin/auth.cgi /var/www/cgi-bin/index.cgi /var/www/cgi-bin/logout.cgi
chmod 644 /var/www/cgi-bin/auth_common.sh /var/www/cgi-bin/session_guard.sh
chmod 644 /var/www/index.html /var/www/login.html /var/www/assets/css/webface.css /var/www/assets/js/login.js