In this chapter, we will establish an appropriate configuration for your web server. For this purpose, we begin to discover the syntax that is used in the Nginx configuration files. Then, we need to understand the various directives that will let you prepare and optimize your web server for the different traffic patterns and hardware setups. Finally, we will create some test pages to make sure that everything has been done correctly and that the configuration is valid. We will only approach the basic configuration directives here. The following chapters will explore more advanced topics such as HTTP module configuration and usage, creating virtual hosts, and more.
This chapter covers the following topics:
The presentation of the configuration syntax
An overview of basic configuration directives
Establishing an appropriate configuration for your profile
Serving a test website
Testing and maintaining your web server