How to Install Nginx on Fedora 22

Atlantic.Net NOC
by Atlantic.Net (68posts) under Cloud Hosting
0 Comments
Verified and Tested 05/20/15

Introduction

In this How-To, we will walk you through the Nginx install on your Fedora 22 Server. Nginx is a HTTP and reverse proxy server and mail proxy server. It is used on many prominent sites such as Netflix and WordPress.

Prerequisites

A cloud server with Fedora 22 already installed. If you do not have a server already, you can spin up a cloud server in under 30 seconds.

Installing NGINX in Fedora 22

To get started, log into your Fedora 22 via SSH or the VNC Console in cloud.atlantic.net. Atlantic.Net Cloud servers are setup as minimal installations in order to avoid having unnecessary packages from being installed and never used.  Because of this, let’s make sure that your server is fully up-to-date.

dnf update

With the server up-to-date, we can continue the installation process on your Fedora 22 server.

Install NGINX with the following command:

dnf install nginx

Start the the service with the following command:

systemctl start nginx

Configure NGINX to start when the system is rebooted:

systemctl enable nginx

You will also need to add the following firewall rules to let HTTP and HTTPS ports through the local firewall. Run the following commands to add them to the firewall:

firewall-cmd --set-default-zone=public
firewall-cmd --permanent --zone=public --add-service=http
firewall-cmd --permanent --zone=public --add-service=https
firewall-cmd --reload

You can then check the status by running:

systemctl status nginx

You will now have NGINX installed on your server and can be verified typing in the following with your IP ADDRESS on your browser. Also, all configuration files are provided in the page.

Your IP could be retrieved from the server with following command:

ifconfig

http://ip.ad.dre.ss

anet-Installing Nginx on Fedora 22

The default page

You can now insert your site in the /usr/share/nginx/html directory. This is the default web directory.

You have now completed installing Nginx on your Fedora 22 server. Come back and check for updates!

Not sure what you need?

Get a free consultation today!

New York, NY

100 Delawanna Ave, Suite 1

Clifton, NJ 07014

United States

San Francisco, CA

2820 Northwestern Pkwy,

Santa Clara, CA 95051

United States

Dallas, TX

2323 Bryan Street,

Dallas, Texas 75201

United States

Ashburn, VA

1807 Michael Faraday Ct,

Reston, VA 20190

United States

Orlando, FL

440 W Kennedy Blvd, Suite 3

Orlando, FL 32810

United States

Toronto, Canada

20 Pullman Ct, Scarborough,

Ontario M1X 1E4

Canada

London, UK

14 Liverpool Road, Slough,

Berkshire SL1 4QZ

United Kingdom

Resources

We use cookies for advertising, social media and analytics purposes. Read about how we use cookies in our updated Privacy Policy. If you continue to use this site, you consent to our use of cookies and our Privacy Policy.