Webserver with Nodejs-php on Cloud

1-click AWS Deployment    1-click Azure Deployment    1-click Google Deployment

Overview

A web server is a computer system that processes requests via HTTP, the basic network protocol used to distribute information on the World Wide Web. Any computer can be turned into a Web server by installing server software and connecting the machine to the Internet. There are many Web server software applications, including public domain software and commercial packages.

Node.js is an open-source, cross-platform runtime environment for developing server-side Web applications. Although Node.js is not a JavaScript framework,many of its basic modules are written in JavaScript, and developers can write new modules in JavaScript. The runtime environment interprets JavaScript using Google’s V8 JavaScript engine.

PHP is a server-side scripting language designed for web development but also used as a general-purpose programming language. Originally created by Rasmus Lerdorf in 1994,the PHP reference implementation is now produced by The PHP Group. PHP originally stood for Personal Home Page,  but it now stands for the recursive backronym PHP: Hypertext Preprocessor.

 

Features

1.Major Features of  Nodejs

  • Event loop
  • Unified API
  • Package management
  • Asynchronous and Event Driven
  • Very Fast
  • Configure log file settings, including where the log files are saved, what data to include on the log files etc. (Log files can be used to analyse traffic etc)
  • Configure website/directory security. For example, which user accounts are/aren’t allowed to view the website, which IP addresses are/aren’t allowed to view the website etc.
  • Create an FTP site. An FTP site allows users to transfer files to and from the site.
  • Create virtual directories, and map them to physical directories
  • HTTP authentication with PHP
  • Cookies
  • Sessions
  • Dealing with XForms

2.Major Features of  PHP –

1.In PHP there is no need to specify data type for variable declaration. Rather, it can be determined at the time of execution depends on the value of the variable. So that, PHP is called as loosely typed language.

2.PHP provides cross-platform compatibility, unlike some other server-side scripting language.

3.PHP has set of pre defined variables called superglobals which will be start by _. Some of the examples are, $_GET, $_POST, $_COOKIE, $_SESSION, $_SERVER and etc. So, any variable except superglobals, that are start with _ will cause error.

4.PHP programming structure includes variable variables; that is, the name of the variable can be change dynamically.

5.This language contains access monitoring capability to create logs as the summary of recent accesses.
And then, it includes several magic methods that begins with __ character which will be defined and called at appropriate instance. For example, __clone() will be called, when the clone keyword is used.

6.Predefined error reporting constants are available to generate a warning or error notice. For example, when E_STRICT is enabled, a warning about deprecated methods will be generated.

7.PHP supports extended regular expression that leads extensive pattern matching with remarkable speed.

8.And then, properties like, now docs and heredocs are used to delimit some block of context which should not be sent for parsing.

9.Since PHP is a single inheritance language, the parent class methods can be derived by only one directly inherited sub class. But, the implementation of traits concept, reduce the gap over this limitation and allow to reuse required method in several classes.

3.Major Features of Web server –
1.Authentication, optional authorization request (request of user name and password) before allowing access to some or all kind of resources.

2.Handling of not only static content (file content recorded in server’s filesystem(s)) but of dynamic content too by supporting one or more related interfaces (SSI, CGI, SCGI, FastCGI, JSP, PHP, ASP, ASP .NET, Server API such as NSAPI, ISAPI, etc.).

3.HTTPS support (by SSL or TLS) to allow secure (encrypted) connections to the server on the standard port 443 instead of usual port 80.

4.Content compression (i.e. by gzip encoding) to reduce the size of the responses (to lower bandwidth usage, etc.).

5.Virtual hosting to serve many web sites using one IP address.

6.Large file support to be able to serve files whose size is greater than 2 GB on 32 bit OS.

7.Bandwidth throttling to limit the speed of responses in order to not saturate the network and to be able to serve more clients.

 

AWS

Usage Instructions For Windows

Step 1) RDP  Connection: To connect to the deployed instance, Please follow Instructions to Connect to Windows  instance on AWS Cloud

Connect to the virtual machine using following RDP credentials:

  • Hostname: PublicDNS  / IP of machine
  • Port : 3389

Username: To connect to the operating system, use RDP and the username is Administrator.
Password: Please Click here to know how to get the password .

Step 2) Once you are connected to the Machine, You can see IIS server running by starting IIS Manager from Server console or using Windows+ R and typing Inetmgr.

To open IIS on the Windows server, Please follow Instructions to Open Internet Information Services (IIS) Manager

PHP is already installed with .Net on IIS.

Nodejs server Console link is put on desktop

Step 3)  Other Information:

1.Default installation path: will be in your root folder
“C:\inetpub\wwwroot ”
“C:\Program Files\Nodejs”
“C:\Program Files\Web server ”
2.Default ports:

  • Windows Machines:  RDP Port – 3389
  • Http: 80
  • Https: 443

Configure custom inbound and outbound rules using this link

Google

Usage Instructions For Windows

Step 1) VM Creation:

  1. Click the Launch on Compute Engine button to choose the hardware and network settings.

2.You can see at this page, overview of Cognosys Image as well as some estimated costs of VM.

3.In the settings page, you can choose the number of CPUs and amount of RAM, the disk size and type, etc.

Step 2) RDP Connection: To connect to the deployed instance, Please follow Instructions to Connect to Windows instance on Google Cloud

Step 3) Once you are connected to the Machine, You can see IIS server running by starting IIS Manager from Server console or using Windows+ R and typing Inetmgr.

To open IIS on the Windows server, Please follow Instructions to Open Internet Information Services (IIS) Manager

PHP is already installed with.Net on IIS.

Nodejs server Console link is put on desktop

Step 4)  Other Information:

1.Default installation path: will be on your root folder
“C:\inetpub\wwwroot ”
“C:\Program Files\Nodejs”
“C:\Program Files\Web server ”
2.Default ports:

  • Windows Machines:  RDP Port – 3389
  • Http: 80
  • Https: 443

3. While Nodejs is already installed but some other instructions on NodeJS is included in below video for informational purposes:

Videos

Install NodeJS on Windows

 

 

 

Webserver with Nodejs-php on Cloud