Installing Nginx on Windows Server

Nginx is a web-server service which has gained almost as much market share as Apache in recent years due to its excellent performance and flexible feature set.  This guide will go through installation instructions and discuss next steps in setting up Nginx to serve your site or application.

Prerequisites:

• A server running a version of Windows Server

Installing Nginx on Windows Server

Nginx comes pre-compiled direct from their website, which makes installation as simple as downloading and extracting the file.  You should grab the latest mainline release for Windows from the link below

http://nginx.org/en/download.html

Once downloaded, simply extract the file to the location you wish to install Nginx at.  We recommend creating a directory for Nginx to live in such as:

C:nginx

Test Nginx

Open a CMD prompt and start Nginx with the following:

C:nginxnginx.exe

Be sure to replace the path if you did not install Nginx in the example directory.  Now you should be able to navigate to http://localhost/ within the server’s web browser and see the Nginx default web page.  If you see “Welcome to Nginx” everything is working as intended.

Items to note for Nginx on Windows

The Nginx project considers the Windows release for Nginx to be in beta.  It is functionally similar to the Unix releases but some features are missing.  See the link below for more specific details on this.

http://nginx.org/en/docs/windows.html

It is also worth noting that Nginx does not run as a service in Windows, so it will not restart automatically based on your settings within the Local Services options.

Next Steps

Nginx is now installed and ready to start serving your application or website.  If you wish to serve more than one site it is recommended that you set up Nginx server blocks to accommodate.

Installing Nginx on CentOS

Nginx is a web-server service which has gained almost as much market share as Apache in recent years due to its excellent performance and flexible feature set.  This guide will go through installation instructions and discuss next steps in setting up Nginx to serve your site or application.

Prerequisites:

• Linux server running CentOS

Installing Nginx on CentOS

Nginx is available in the default repositories for most popular Linux distributions including CentOS.  As such installing it is as simple as running the following dnf package-manager command:

sudo dnf install nginx

Be sure to hit ‘y’ for the Y/N prompt to confirm that you wish to install the package.

After dnf finishes installing the packages, Nginx has been installed.  However, we are not done quite yet.  You should also enable and start the service.  This both sets up Nginx to startup when the server does, as well as starting it up now for further configuration and testing.

sudo systemctl enable nginx
sudo systemctl start nginx

Open the firewall for Nginx

By default Nginx will be configured to listen on the default ports for HTTP and HTTPS traffic, 80 and 443 respectively.  However, this does not mean that it will receive traffic, as the firewall on the system will need to also allow traffic on these ports.  We recommend adding the ports needed for your site or application, namely HTTP and/or HTTPS:

sudo firewall-cmd --permanent --add-service=http

sudo firewall-cmd --permanent --add-service=https

Then reload firewalld to apply the new settings:

sudo firewall-cmd --reload

Test Nginx

Once the package is installed and the firewall port or ports are open Nginx should be displaying its default webpage.  You can see this by typing in your IP address in your web browser.  You should see a splash page with Nginx’s logo and a “Welcome to Nginx” message.  If you do not see this, double check the IP, that Nginx is running, and the firewall settings.  

Next Steps

Nginx is now installed and ready to start serving your application or website.  You can utilize the default configuration to serve a site by placing its content at /var/www/html in your filesystem.  However, if you wish to serve more than one site it is recommended that you set up Nginx server blocks to accommodate.

Installing Nginx on Ubuntu

Nginx is a web-server service which has gained almost as much market share as Apache in recent years due to its excellent performance and flexible feature set.  This guide will go through installation instructions and discuss next steps in setting up Nginx to serve your site or application.

Prerequisites:

• Linux server running Ubuntu

Installing Nginx on Ubuntu

Nginx is available in the default repositories for most popular Linux distributions including Ubuntu.  As such installing it is as simple as running the following apt package-manager commands:

sudo apt update
sudo apt install nginx

Running update before installing new packages is a best practice, as it allows apt to grab the latest package listings.  This allows the most up-to-date version of the package available on the repository to be the one chosen for installation.

After apt finishes installing the packages, Nginx has been installed.  However, we are not done quite yet.  You should also enable and start the service.  This both sets up Nginx to startup when the server does, as well as starting it up now for further configuration and testing.

sudo systemctl enable nginx
sudo systemctl start nginx

Open the firewall for Nginx

By default Nginx will be configured to listen on the default ports for HTTP and HTTPS traffic, 80 and 443 respectively.  However, this does not mean that it will receive traffic, as the firewall on the system will need to also allow traffic on these ports.  Luckily, Nginx makes this easy for us as it registers itself as a service within UFW.  Thus we can simply enable the service on UFW.  Run the following to see what services are available on UFW:

sudo ufw app list

You should see three options for Nginx, Full, HTTP, and HTTPS.  These services represent both HTTP and HTTPS traffic, just HTTP traffic, and just HTTPS traffic.  Enable the one that is appropriate for your site.  Please note if you wish to have a redirect from HTTP to HTTPS you will want to select Full in this list.  Then simply enable your selection with the following:

sudo ufw allow 'Nginx '

Please replace the with the option best suited for your needs.  We recommend only opening the port or ports needed by your application, as minimizing the number of available ports is a security best practice.

Test Nginx

Once the package is installed and the firewall port or ports are open Nginx should be displaying its default webpage.  You can see this by typing in your IP address in your web browser.  You should see a splash page with Nginx’s logo and a “Welcome to Nginx” message.  If you do not see this, double check the IP, that Nginx is running, and the firewall settings.  

Next Steps

Nginx is now installed and ready to start serving your application or website.  You can utilize the default configuration to serve a site by placing its content at /var/www/html in your filesystem.  However, if you wish to serve more than one site it is recommended that you set up Nginx server blocks to accommodate.

Installing Nginx on Fedora

Nginx is a web-server service which has gained almost as much market share as Apache in recent years due to its excellent performance and flexible feature set.  This guide will go through installation instructions and discuss next steps in setting up Nginx to serve your site or application.

Prerequisites:

• Linux server running Fedora

Installing Nginx on Fedora

Nginx is available in the default repositories for most popular Linux distributions including Fedora.  As such installing it is as simple as running the following dnf package-manager command:

sudo dnf install nginx

Be sure to hit ‘y’ for the Y/N prompt to confirm that you wish to install the package.

After dnf finishes installing the packages, Nginx has been installed.  However, we are not done quite yet.  You should also enable and start the service.  This both sets up Nginx to startup when the server does, as well as starting it up now for further configuration and testing.

sudo systemctl enable nginx
sudo systemctl start nginx

Open the firewall for Nginx

By default Nginx will be configured to listen on the default ports for HTTP and HTTPS traffic, 80 and 443 respectively.  However, this does not mean that it will receive traffic, as the firewall on the system will need to also allow traffic on these ports.  Add the ports necessary for your site by adding the HTTP and/or HTTPS services:

sudo firewall-cmd --permanent --add-service=http

sudo firewall-cmd --permanent --add-service=https

Then reload firewalld to apply the new settings:

sudo firewall-cmd --reload

Test Nginx

Once the package is installed and the firewall port or ports are open Nginx should be displaying its default webpage.  You can see this by typing in your IP address in your web browser.  You should see a splash page with Nginx’s logo and a “Welcome to Nginx” message.  If you do not see this, double check the IP, that Nginx is running, and the firewall settings.  

Next Steps

Nginx is now installed and ready to start serving your application or website.  You can utilize the default configuration to serve a site by placing its content at /var/www/html in your filesystem.  However, if you wish to serve more than one site it is recommended that you set up Nginx server blocks to accommodate.

Installing IIS on Windows Server 2012 R2

IIS stands for Internet Information Services and acts as the default web server application for Windows Server. This guide will walk you through the initial setup of IIS so you can start utilizing it with Windows Server 2012 R2 to host a website or application.

Prerequisites: 

  • A Server running Windows 2012 R2

Installing IIS

  • Open Server Manager
  • Click ‘Manage’ in the top right, then “Add Roles and Features”

  • “Role-based or feature-based installation” should be defaulted as the selection, if not select it and click “Next”
  • Select the server to be modified. In most cases, the only option here will be the local server. Click “Next” to continue
  • Add the IIS role. Scroll through the options presented until you have the option to select “Web Server(IIS)” then click next.  The system may ask if you also want to install the required packages for IIS.  Make sure to select to install these as well.

  • (Optional) select any desired additional packages to be installed alongside IIS. For most installs, the default package is adequate so it is generally safe to skip this step by hitting next.

  • Click “Next”. This screen is informational (if this is your first time doing this I’d recommend reading it) and so it is safe to move on.
  • Select any additional options and determine configuration variables. For most installations, the defaults are fine here.

  • Click “Install” to finish the wizard.

IIS will now be installed and enabled.  You can now start working with IIS and importing or creating your site or application.

Install Mumble on Fedora 31

Mumble is a voice over IP (VoIP) application used primarily by gamers. In this article, we’ll be installing the Mumble server on a Fedora  Cloud Server and connecting to it from the Mumble client.

Prerequisites

A Cloud Server running Fedora 31

Access to the root or admin user

Install Mumble

Install the mumble-server package using apt.

dnf install mumble-server

Set password for SuperUser. Make sure to replace with a secure password of your choosing.

murmurd -supw 

Start and enable Mumble.

systemctl enable murmur

systemctl start murmur

Add the Mumble port to your firewall.

firewall-cmd --permanent --add-port=64738/tcp

firewall-cmd --reload

Connect to your Mumble server

To connect to your Mumble server, open up the Mumble client and click Add New….

Enter your server details and the password your choose during install. Click OK and then Connect.

Install Mumble on Ubuntu 18.04

Mumble is a voice over IP (VoIP) application used primarily by gamers. In this article, we’ll be installing the Mumble server on an Ubuntu 18.04 Cloud Server and connecting to it from the Mumble client.

Prerequisites

A Cloud Server running Ubuntu 18.04

Access to the root or admin user

Install Mumble

Install the mumble-server package using apt.

apt install mumble-server

Configure Mumble with dpkg.

dpkg-reconfigure mumble-server

You’ll be asked if you want the service to start on boot. This is recommended.

In order to ensure low latency audio, select Yes.

Choose a secure password.

Connect to your Mumble server

To connect to your Mumble server, open up the Mumble client and click Add New….

Enter your server details and the password your choose during install. Click OK and then Connect.

Install Mumble on Debian 10

Mumble is a voice over IP (VoIP) application used primarily by gamers. In this article, we’ll be installing the Mumble server on a Debian 10 Cloud Server and connecting to it from the Mumble client.

Prerequisites

A Cloud Server running Debian 10

Access to the root or admin user

Install Mumble

Install the mumble-server package using apt.

apt install mumble-server

Configure Mumble with dpkg.

dpkg-reconfigure mumble-server

You’ll be asked if you want the service to start on boot. This is recommended.

In order to ensure low latency audio, select Yes.

Choose a secure password.

Connect to your Mumble server

To connect to your Mumble server, open up the Mumble client and click Add New….

Enter your server details and the password your choose during install. Click OK and then Connect.

Install Nextcloud on CentOS 8

Nextcloud is a file sharing software similar to Google drive or Dropbox. The difference is you have full control as Nextcloud is open source and the server can be installed on your own machine. In this article, we’ll be installing Nextcloud on a CentOS 8 Cloud Server.

Prerequisites

A Cloud Server running CentOS 8

Access to the root or admin user

Install LAMP Stack

First thing to do is install and configure the LAMP (Linux Apache Mariadb PHP)  stack on your server.

Step 1: Install software

dnf install httpd
dnf install php php-gd php-mbstring php-intl php-mysqlnd php-opcache php-json php-zip php-xml
dnf install mariadb mariadb-server

Step 2: MySQL secure installation

It’s a good idea to always run the mysql_secure_installation command right after installing MariaDB or MySQL in order to set a root password, disallow remote root logins, and delete the test databases.

systemctl enable mariadb
systemctl start mariadb
mysql_secure_installation

Step 3: Database configuration

Enter your MariaDB installation.

mysql -p

Create a nextcloud database.

CREATE DATABASE nextcloud;

Create a nextcloud user. Make sure to replace with a secure password of your choosing.

CREATE USER 'nextcloud'@'localhost' IDENTIFIED BY '';

Give nextcloud user access to the nextcloud database.

GRANT ALL PRIVILEGES ON nextcloud.* TO 'nextcloud'@'localhost';

Flush privileges.

FLUSH PRIVILEGES;

Exit MariaDB.

exit

Install Nextcloud

Now that we have our base LAMP stack set up, we can move on to installing Nextcloud itself.

Step 1: Download and prepare Nextcloud

Change to the document root directory.

cd /var/www/html/

Download the latest version of Nextcloud.

wget https://download.nextcloud.com/server/releases/latest.zip

Decompress the file.

unzip latest.zip

Remove the compressed file.

rm latest.zip

Give ownership to the web server.

chown -R apache:apache nextcloud/

Restart Apache.

systemctl enable httpd

systemctl start httpd

Add the http and https services to your firewall.

firewall-cmd --permanent --add-service=http

firewall-cmd --permanent --add-service=https

firewall-cmd --reload

Step 2: Install Nextcloud through web browser

In your web browser on your local machine, navigate to http:///nextcloud

Here, you’ll be able to create your admin user and configure database access. As far as the admin account, choose any secure username/password combination.

Click on the “Storage & database” dropdown. Select “MySQL/MariaDB”.

Enter the same credentials we configured earlier in the Database configuration step. It should be nextcloud as the user and database and the password you set.

Nextcloud will then install the base system as well as a few apps you may find useful. Once this is done, you’ll be greeted with the Nextcloud panel and will be ready to upload some files!

Install Nextcloud on Ubuntu 18.04

Nextcloud is a file sharing software similar to Google drive or Dropbox. The difference is you have full control as Nextcloud is open source and the server can be installed on your own machine. In this article, we’ll be installing Nextcloud on an Ubuntu 18.04 Cloud Server.

Prerequisites

A Cloud Server running Ubuntu 18.04

Access to the root or admin user

Install LAMP Stack

First thing to do is install and configure the LAMP (Linux Apache Mariadb PHP)  stack on your server.

Step 1: Install software

apt install apache2 mariadb-server libapache2-mod-php7.2 unzip

apt install php7.2-gd php7.2-json php7.2-mysql php7.2-curl php7.2-mbstring

apt install php7.2-intl php-imagick php7.2-xml php7.2-zip

Step 2: MySQL secure installation

It’s a good idea to always run the mysql_secure_installation command right after installing MariaDB or MySQL in order to set a root password, disallow remote root logins, and delete the test databases.

mysql_secure_installation

Step 3: Database configuration

Enter your MariaDB installation.

mysql

Create a nextcloud database.

CREATE DATABASE nextcloud;

Create a nextcloud user. Make sure to replace with a secure password of your choosing.

CREATE USER 'nextcloud'@'localhost' IDENTIFIED BY '';

Give nextcloud user access to the nextcloud database.

GRANT ALL PRIVILEGES ON nextcloud.* TO 'nextcloud'@'localhost';

Flush privileges.

FLUSH PRIVILEGES;

Exit MariaDB.

exit

Install Nextcloud

Now that we have our base LAMP stack set up, we can move on to installing Nextcloud itself.

Step 1: Download and prepare Nextcloud

Change to the document root directory.

cd /var/www/html/

Download the latest version of Nextcloud.

wget https://download.nextcloud.com/server/releases/latest.zip

Decompress the file.

unzip latest.zip

Remove the compressed file.

rm latest.zip

Give ownership to the web server.

chown -R www-data:www-data nextcloud/

Restart Apache.

systemctl restart apache2

Step 2: Install Nextcloud through web browser

In your web browser on your local machine, navigate to http:///nextcloud

Here, you’ll be able to create your admin user and configure database access. As far as the admin account, choose any secure username/password combination. For the database, enter the same credentials we configured earlier in the Database configuration step. It should be nextcloud as the user and database and the password you set.

Nextcloud will then install the base system as well as a few apps you may find useful. Once this is done, you’ll be greeted with the Nextcloud panel and will be ready to upload some files!