RSA Key pair seed
Generated randomly using phpseclib
---
Configuring Apache.
Windows: [Install rootdir]\conf\httpd.conf
Linux  : lies in /etc
- [httpd.conf changed a lot to reflect what URL it appears on. Go thru it once
  more before delivery.]
- Install it with modssl enabled.

- Configure to run the server on a non-standard port
  [Line 46] Listen 4096

- Webadmin email
  [Line 167] ServerAdmin email@domain.com

- Server LAN identifier [machineName.domain:port]
  [Line 176] etc-dghai.andrew.ad.cmu.edu:4096

- Default root directory of the server
  [Line 183] DocumentRoot "<path>"

- Permissions on default root
  [Lines 210 - 238]
  <Directory "<path>">
    Options Indexes FollowSymLinks
    AllowOverride None
    Order allow,deny
    Allow from all
  </Directory>

- Add an environment variable to identify it as a production or development
  server. It can go into httpd.conf or .htaccess. Production server will
  have value set to 1.
  [Line 133]
  SetEnv production_server 0

--------------------
Add PHP to Apache
--------------------
- Use PHP 5.2.17 thread safe version for installation.
- Search for LoadModule string. Add in section with that data
  [Line 130] LoadModule php5_module "<path to php5apache2_2.dll>"

- Search for AddType string. Add in section with that data
  [Line 392] AddType application/x-httpd-php .php

- (optional) To make server look for index.php in directory
  [Line 247] DirectoryIndex index.php

- making mysqli (php) work on WAMP
  http://www.apachelounge.com/viewtopic.php?t=3890
  Install MySQL Workbench tools, replace libmysql.dll in php install dir
  with that from C:\Program Files (x86)\MySQL\MySQL Workbench CE 5.2.34.2
  - paste php_mysqli.dll in <php_install_dir>\ext and modify php.ini as
    {Lines 1906 - 1907}
    {Search for PHP_MYSQL. Following lines will go in that section}
    [PHP_MYSQLI]
    extension=php_mysqli.dll

- Openssl on windows
  PHP does not include php_openssl.dll by default. Download it from
  http://windows.php.net/downloads/releases/php-5.3.8-Win32-VC9-x86.zip
  Its in the extension folder. Copy it to <PHP_Install_dir>\ext
  and put the following lines in php.ini
    [PHP_OPENSSL]
    extension=php_openssl.dll
==========
MySQL
- root pass: vroom 360
  the password does have a space.

- schema: vroom360
  user: webuser
  password: 2b00a6ee707290a755f1a880783fcc40
  -password is md5 of string "vroom 360"
  -Following string will be stored in mysql db which is result of SELECT PASSWORD('2b00a6ee707290a755f1a880783fcc40') FROM DUAL;
   *C5DF9C11FDCEA187921EEB5DDDFF0C32FE9CB352    //it includes asterisk.
  -look for privileges below. This is a very restricted user.

- schema: vroom360
  user: vroomadmin
  password: 3e2b57d2622012ec92a10a11e548f1c4
  -password is md5 of string "carview"
  -Following string will be stored in mysql db which is result of SELECT PASSWORD('3e2b57d2622012ec92a10a11e548f1c4') FROM DUAL;
   *D272B26E75F3D18F7EB3C0714F77960D0015DB79
  -This user only has Delete privileges in addition to the ones normal
   webuser has.
-- --------------------------------------------------
-- USERS
-- --------------------------------------------------
-- Create user with qualified domain and ip address. Not using wildcards.
CREATE USER 'webuser'@'127.0.0.1' IDENTIFIED BY PASSWORD '*C5DF9C11FDCEA187921EEB5DDDFF0C32FE9CB352';
CREATE USER 'webuser'@'localhost' IDENTIFIED BY PASSWORD '*C5DF9C11FDCEA187921EEB5DDDFF0C32FE9CB352';

-- http://dev.mysql.com/doc/refman/5.6/en/grant.html#grant-privileges
GRANT SELECT, INSERT, UPDATE, EXECUTE ON vroom360.* TO 'webuser'@'127.0.0.1';
GRANT SELECT, INSERT, UPDATE, EXECUTE ON vroom360.* TO 'webuser'@'localhost';

-- User for the admin mode for website
CREATE USER 'vroomadmin'@'127.0.0.1' IDENTIFIED BY PASSWORD '*D272B26E75F3D18F7EB3C0714F77960D0015DB79';
CREATE USER 'vroomadmin'@'localhost' IDENTIFIED BY PASSWORD '*D272B26E75F3D18F7EB3C0714F77960D0015DB79';

GRANT SELECT, INSERT, UPDATE, EXECUTE, DELETE ON vroom360.* TO 'vroomadmin'@'127.0.0.1';
GRANT SELECT, INSERT, UPDATE, EXECUTE, DELETE ON vroom360.* TO 'vroomadmin'@'localhost';
======================================================
- admin mode needs to have digest authentication implemented.
- One database connection per page. So connections are managed by UI.