E1:
Build Zoobar website
Turn on Apache services and MySQL Services
Service Apache2 Start
Service MySQL Start
Establish database and table mysql->
Create Database Myzoo;
Use Myzoo;
CREATE TABLE person (PersonID int primary key auto_increment, Password varchar (+), Salt varchar (+), Username varchar ( (+), Token varchar (+), Zoobars int default, profile varchar (5000));
In the Myzoo includes folder, modify the database file to assign the user name, password, and database name to the corresponding variable
Comment/etc/apache2/apache2.conf
<directory/> #Require All denied</directory>
Modify/etc/apache2/sites-available/000-default.conf
<virtualhost 127.0.0.1:80>
ServerName www.myzoo.com
Documentroot/var/www/myzoo
</vitualHost>
Modify/etc/hosts
127.0.0.1 www.myzoo.com
Restart Apache
Service Apache2 Restart
E2:
Apache Multi-site configuration
Create www.attack.com Web site
Create/etc/apache2/site-available/attack.conf
<virtualhost 127.0.0.3:80> ServerName www.attack.com documentroot/var/www/attack<virtualhost>
Create/etc/apache2/site-enable/attack.conf
<virtualhost 127.0.0.3:80> ServerName www.attack.com documentroot/var/www/attack<virtualhost>
Modify/etc/hosts
127.0.0.3 www.myzoo.com
Restart Apache
Service Apache2 Restart
E3:
HTTPS Web site Configuration
Create a certificate store
Myca is used to store CA certificates, certificate databases, generated certificates, keys, and requests
Signedcerts: Save copy of the signing certificate
Private: Contains the private key
CACONFIG.CNF is the CA configuration file
Generate CA root Certificates and keys
Configuring the server configuration file myservice.cnf
Generate server certificates and keys
Tempkey Temporary private key
Tempreq Certificate Request
Generate Server Encrypted private key
The CA private key signs the server certificate
Delete temporary private keys and temporary certificates
SERVER_CRT.PEM: Service Signing certificate
SERVER_KEY.PEM: Server key
Web security: HTTPS