"Nginx + Memcached + MySQL + HHVM + PHP" Package Powered by SAIN3 (HVM)

User Guide

 

1.Nginx

Nginx is a high performance, open source web application accelerator that helps over 37% of the world’s busiest websites deliver more content, faster, to its users. Companies deploy Nginx to manage the complexities and pitfalls associated with HTTP and to make their web applications more responsive, scalable, fast and secure. Nginx is commonly installed between the network and the application to offload concurrency processing, URL switching, HTTP load balancing, SSL termination, caching, and security policies.

 

2.memc nginx module

An extended version of the standard memcached module that supports set, add, delete, and many more memcached commands.

https://github.com/openresty/memc-nginx-module

 

3.srcache nginx module

Transparent subrequest-based caching layout for arbitrary nginx locations.

https://github.com/openresty/srcache-nginx-module

 

4. HipHop Virtual Machine (HHVM)

HipHop Virtual Machine (HHVM) is an open-source virtual machine designed for executing programs written in Hack and PHP by using a just-in-time (JIT) compilation approach to achieve superior performance.

 

5.Webmin

Webmin is a web-based system configuration tool for Unix-like systems. With it, it is possible to configure operating system internals, such as users, disk quotas, services or configuration files, as well as modify and control open source apps. If you want to manage Apache and MySQL through the Web page, Webmin is the right tool for you.

 

 

Usage instructions


**Important Info**

Before you start to access the system, please make sure the "Status Checks" of the instance in AWS Console turns to "2/2 checks passed", or the initialization process might be interrupted and fails. It takes about 5-10 mins.

 

**Default settings**

1.Webmin / MySQL:

Username: root

Password: <instance ID>

 

** Access the system**

1. Visit your Nginx.

http://<public DNS>

2. Webmin at http://<public DNS>:10000.

Username: root, password: <instance ID>.

3. You can manage MySQL through Webmin.

Login to webmin->Un-used Modules-> MySQL Database Server.

Username: root, password: <instance ID>.

Please note that MySQL Database Server has been installed. It is in the Un-used Modules because its version 5.6 is newer than 5.5.

 

** For your info **

By default, Nginx is installed in /usr/local/nginx.

Nginx DocumentRoot directory: "/var/www"

Nginx configuration file: "/usr/local/nginx/conf/nginx.conf"

Nginx logs directory: "/usr/local/nginx/logs"

Nginx user: www-data

 

** How do I know Nginx is successfully processing PHP **

Please visit http://<public DNS>/info.php.

If you can see that the web page successfully shows the information of PHP, it means Nginx is successfully processing PHP with HHVM. After that, please delete the info.php in /var/www for security.

 

Replace the <public DNS> above with the actual ip address of the running EC2 instance.

 

 

** Oops, PHP web page is blank **

Please make sure the Nginx configuration file /usr/local/nginx/conf/nginx.conf includes the following code in the “ location ~ \.php$ ” part:

fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;

 

** Cannot Access to Webmin**

1. After the "Status Checks" of the instance in AWS Console turns to "2/2 checks passed" can you start to access the system, or the initialization process might be interrupted and fails.

2.Make sure port 10000 is in your security group.

Type: Custom TCP Rule

Protocol: TCP

Port range: 10000

Source: 0.0.0.0/0