You are on page 1of 8

Vocabulary

Is the way to go
Example:
if you don’t plan on using any third party Nginx modules the mainline
branch is the way to go

First and Then


Example:
First add the user.
Then move him up the list

Add and Set


Example:
add the client_max_body_size directive and set this to the maximum
upload size you require

Determine
Example:
The keepalive_timeout determines how many seconds a connection to
the client should be kept open before it’s closed by Nginx

Moving down the file/page/


Example:
Moving down the file you will see the http block

Towards the bottom of the file/page


Example:
Towards the bottom of the file you’ll find a line that reads:

find a line that reads:


Example:
Towards the bottom of the file you’ll find a line that reads:

Further down
Example:
Further down the http block you will see a section dedicated to Gzip
compression. 

Section dedicated to
Example:
Further down the http block you will see a section dedicated to Gzip
compression.

The first thing to change is


Example:
The first directive to change is the keepalive_timeout, which by default
is set to 65

Ensure, If not
Example:
. For security reasons you should uncomment
the server_tokens directive and ensure it is set to off
. you also need to ensure the fastcgi_param
SCRIPT_FILENAME directive is set
. Ensure the following directive exists, if not add it to the file:
. you should ensure that the configuration file contains no errors by
issuing the following command

Underneath 
Example:
. Underneath service tokens
. Underneath add the following:

I chose
Example:
I chose a value of 64m

By default
Example:
By default, Gzip is enabled

Tweak
Example:
you should tweak these values further for better handling of static files.

which will ensure


Example:
First, you should uncomment the gzip_proxied directive and set it to any,
which will ensure all proxied request responses are gzipped. 

First, Secondly,Next and Finally / The last step / The last thing to address
Example:
First, you should uncomment the gzip_proxied directive and set it to any.
Secondly, you should uncomment the gzip_comp_level and set it to a
value of 2,
Next, you should adjust your php.ini file to increase the WordPress
maximum upload size.
Finally, you should uncomment the gzip_types directive
The last step is to secure MariaDB.
The last thing to address in this post is to remove the default server
block from Nginx. 

Set it to a value of
Example:
Set it to a value of 2

Be careful, As it can have


Example:
Be careful not to set this value too high as it can have a negative impact
on CPU usage.

leaving the default values in place


Example:
Finally, you should uncomment the gzip_types directive, leaving the
default values in place

otherwise
Example:
you also need to ensure the fastcgi_param SCRIPT_FILENAME directive is
set, otherwise you will receive a blank white screen when accessing any
PHP scripts.

Open File/Document/page
Example:
. Open the fastcgi_params file:
. Open the default pool configuration file:

Hit, Followed By, To save and Then


Example:
hit CTRL X followed by Y
Hit CTRL X and Y to save the configuration.
Hit CTRL X followed by Y to save the changes and then test the Nginx
configuration:
Before doing so
Example:
For the changes to take effect you must restart Nginx, however before
doing so you should ensure that the configuration file contains no errors
by issuing the following command:

in addition
Example:
This will ensure that JavaScript, CSS and other file types are gzipped in
addition to the HTML file type.

By issuing
Example:
. you should ensure that the configuration file contains no errors by
issuing the following command:
. Now that Nginx and PHP have been installed, you can confirm that
they are both running under the correct user by issuing
the top command:

If everything looks ok:


Example:
If everything looks ok, go ahead and restart Nginx:

If everything worked out ok


Example:
If everything worked out ok, you should still be able to see the Nginx
welcome page when visiting the FQDN in the browser.

so I like to use
Example:
so I like to use one maintained by Ondřej Surý

After, Confirm:
Example:
After the installation has completed, confirm that PHP has installed
correctly:

Now that, you need/you can


Example:
. Now that PHP has installed you need to configure the user and group
that the service will run under.
. Now that Nginx and PHP have been installed, you can confirm that
they are both running under the correct user by issuing
the top command: 
isn’t designed
Example:
Because the server isn’t designed for a shared hosting environment, it’s
ok to run a single PHP pool under your user account. 

Change, Replacing
Example:
Change the following lines, replacing www-data with your username:

The final
Example:
The final package to install is MariaDB, which is a drop in replacement for
MySQL.

I choose, over
Example:
I choose MariaDB because it offers more features and speed
improvements over MySQL.

like you did for


Example:
Add the repository and update the package lists like you did for Nginx
and PHP-FPM:

You’ll be prompted
Example:
You’ll be prompted to enter a root password, which should be complex,
as described at the end of the previous post.

at the end of the previous post/lesson.


Example:
You’ll be prompted to enter a root password, which should be complex, as
described at the end of the previous post.

Once, You need to


Once MariaDB has installed, you need to setup the default system tables:

That’s all, In the next lesson


Example:
That’s all for this post, if you have any questions please feel free to ask
them below. In the next post I will guide you through the process of
setting up your first WordPress site and how to manage multiple
WordPress installs.

Navigate to
Example:
Navigate to the sites-available directory:

With the directory structure in place


Example:
With the directory structure in place it’s time to create the server block
in Nginx.

Begin
Example:
Begin by creating the required directories and setting the correct
permissions:

Copy and paste


Example:
Copy and paste the following configuration, ensuring that you change
the server_name, access_log, error_log and root directives to match your
domain and file paths.

bare-bones
Example:
This is a bare-bones server block that informs Nginx to serve
the ashleyrich.com domain

The command
Example:
The command should output information about your current PHP version
and a few other details.

With everything in place, Then, You now need to, Finally, On Success
Example:
. With everything in place it’s time to install WordPress. Start by
navigating to the site’s public directory:
. Then using WP-CLI, download the latest stable version of WordPress
into the working directory:
. You now need to create a wp-config.php file. Luckily, WP-CLI has you
covered:
. Finally, with the wp-config.php file in place, you can install WordPress
and setup the admin user in one fell swoop:
. On success, you should be able to visit the domain name within the
browser and be presented with a blank WordPress installation:
Here’s a quick breakdown
Example:
Here’s a quick breakdown of how I personally add them:

It’s as simple as that.


Example: No Example, Stand-alone

Both of which
Example:
The only limiting factors are available system resources (CPU, RAM, etc)
and bandwidth restrictions imposed by your VPS provider. Both of which
can be overcome by upgrading your package.

You are free to add


Example:
You are free to add as many additional sites to your server as you like.

Head to the
Example:
Head to the Monitoring tab

Once installed and activated


Example:
Once installed and activated, go to Tools > Redis to enable the object
cache.

Once happy
Example:
Once happy, save the configuration.

Next you need to


Example:
Next you need to add the following directives to your nginx.conf file.

The First, The Second


Example:
The first instructs the FastCGI module on how to generate key names and
the second adds an extra header to server responses so that you can
easily determine whether a request is being served from the cache.
Now when you visit the site/page/document
Example:
Now when you visit the site and view the headers, you should see an
extra parameter.

Once installed, navigate to 


Example:
Once installed, navigate to Tools > Nginx and define your cache zone
path.

You may be wondering why, this is due to


Example:
You may be wondering why I cd into the directory and then run wp-
cron.php. This is due to how older versions of WordPress used relative
paths for including files, as seen here. 

The ____________ part ensures


Example:
The >/dev/null 2>&1 part ensures that no emails are sent to the user
account initiating the cron job.

Still Requires
Example:
WordPress still requires sending outgoing emails.

Paste the following contents in to the file


Example:
Paste the following contents in to the file

You might also like