Content Server Setup - Part 3
3. Nginx Server Setup
Now that i) we have configured a generic Linux server on your machine ii)created a user that can access to this server, we will now move on to the next step.
In this guide, we’ll cover how to install Nginx (a webserver) on your Ubuntu 18.04 server.
What is Nginx?
Nginx is one of the most popular web servers currently being used and hosts some of the highest-traffic sites on the internet. It is really resource-friendly and can be used as a web server or reverse proxy. To know more about Nginx please click here
Open terminal in Ubuntu
TYPE the following commands
$ sudo su $ [sudo] password for 'username': # once you've entered your password you will have root permissions
Installing Nginx
$ sudo apt update $ sudo apt install nginx #After accepting the procedure, apt will install Nginx and any required dependencies to your server.
Adjusting the Firewall
$ sudo ufw app list #You should get a listing of the application profiles: output: Available applications: Nginx Full Nginx HTTP Nginx HTTPS OpenSSH # Nginx HTTP: This profile opens only port 80 (normal, unencrypted web traffic). You need to enable this $ sudo ufw allow 'Nginx HTTP' #You can verify by typing $ sudo ufw status output: Status: active To Action From -- ------ ---- OpenSSH ALLOW Anywhere Nginx HTTP ALLOW Anywhere OpenSSH (v6) ALLOW Anywhere (v6) Nginx HTTP (v6) ALLOW Anywhere (v6) #You should see HTTP traffic allowed in the displayed output
Checking for webserver
Enter your server IP address
When you have your server’s IP address, enter it into your browser’s address bar:
This should display the default Nginx landing page
Now you will have to set up the server blocks
Creating web directory for each host
Creating demo page for each Host
Add the following lines
Create configuration file for each host
Enable Nginx Server block
Test Nginx Server block
We’re working on a script that will do all of this manual work for you → script.sh (still to come) please configure manually for now, we are working on automating this process by writing a simple script. It should be available soon
to execute this
Name it something like:
script.sh
.Make it executable:
sudo chmod 755 script.sh
Run it:
sudo ./script.sh example.com
Once you have all of this setup, you will have to send the following information to Rumie.
Provide Rumie:
Public IP Address of the Server
Username - Part 2
User Password - Part 2
Web Directory Root
Content Sync Schedule (UTC Time + Day(s) of the Week/Month)
Project ID it should be connected to
Rumie will use this information to access your server and sync Content
The Rumie Initiative