Posts

Showing posts from 2017

Hosting node.js applications in IIS

Image
Hosting node.js applications in IIS Setup new site on IIS web server and bind your domain name on node application directory path. Setup Url Rewrite rule of Reverse proxy for your node application port. (Like 3000 or any)  From above screen shot, you can add Reverse proxy rule directly from IIS Manager or You can put below configuration in web.config. <?xml version="1.0" encoding="UTF-8"?> <configuration> <system.webServer> <rewrite> <rules> <rule name="ReverseProxyInboundRule1" stopProcessing="true"> <match url="(.*)" /> <conditions> <add input="{CACHE_URL}" pattern="^(https?)://" /> </conditions> <action type="Rewrite" url="{C:1}://localhost:3000/{R:1}&qu

Multiple PHP version on the same server using php-fpm on Ubuntu16.04

Image
Run multiple PHP version on the same server using php -fpm on Ubuntu16.04 After some Google research and some my modification this solution finally worked for me: Install PHP 5.6, 7.0 and 7.1 as fpm Install php 5.6 , php 7.0 and php7.1 fpm sudo su add-apt-repository ppa:ondrej/php apt-get update apt-get install libapache2-mod-fastcgi php5.6 php5.6-fpm php5.6-dev php5.6-mbstring php5.6-mcrypt php5.6-mysql php5.6-zip php5.6-gd php5.6-xml php5.6-curl php5.6-intl php5.6-json php7.0 php7.0-fpm php7.0-dev php7.0-mbstring php7.0-mcrypt php7.0-mysql php7.0-zip php7.0-gd php7.0-xml php7.0-curl php7.0-intl php7.0-json php7.1 php7.1-fpm php7.1-dev php7.1-mbstring php7.1-mcrypt php7.1-mysql php7.1-zip php7.1-gd php7.1-xml php7.1-curl php7.1-intl php7.1-json Enable all necessary Apache modules: a2enmod actions a2enmod fastcgi Making PHP-FPM use By default PHP-FPM is listening on the socket /var/run/php/php7.0-fpm.sock. It is also possible to make PHP-FPM use a TCP connection

Install MongoDB Community Edition on Ubuntu

--> install mongodb community edition 1. Import the public key used by the package management system.  sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 0C49F3730359A14518585931BC711F9BA15703C6 2. Create a list file for MongoDB. -> Ubuntu 12.04: echo "deb [ arch=amd64 ] http://repo.mongodb.org/apt/ubuntu precise/mongodb-org/3.4 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.4.list -> Ubuntu 14.04: echo "deb [ arch=amd64 ] http://repo.mongodb.org/apt/ubuntu trusty/mongodb-org/3.4 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.4.list ->Ubuntu 16.04 echo "deb [ arch=amd64,arm64 ] http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.4 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.4.list 3 Reload local package database.     sudo apt-get update 4 Install the MongoDB packages.     sudo apt-get install -y mongodb -org 5 Start MongoDB.      sudo service mongod start 6 Verify that MongoDB h

How-to-set-up-a-node-js-application-for-production-on-ubuntu-16-04

How To Set Up a Node.js Application for Production on Ubuntu 16.04 Introduction Node.js is an open source JavaScript runtime environment for easily building server-side and networking applications. The platform runs on Linux, OS X, FreeBSD, and Windows. Node.js applications can be run at the command line, but we'll focus on running them as a service, so that they will automatically restart on reboot or failure, and can safely be used in a production environment. Install Node.js First, you need to install the NodeSource PPA in order to get access to its contents. Make sure you're in your home directory, and use curl to retrieve the installation script for the Node.js 6.x archives: cd ~ curl -sL https://deb.nodesource.com/setup_6.x -o nodesource_setup.sh curl -sL https://deb.nodesource.com/setup_8.x -o nodesource_setup.sh You can inspect the contents of this script with vi (or your preferred text editor): vi nodesource_setup.sh And run the script under s