From 3482ef759d6e373874a6e142f2cafc3a62153d21 Mon Sep 17 00:00:00 2001 From: Ashley Rich Date: Fri, 1 May 2020 12:10:56 +0100 Subject: [PATCH] Updated readme to remove references to repo --- README.md | 49 ++++++++++++++++++++++++------------------------- 1 file changed, 24 insertions(+), 25 deletions(-) diff --git a/README.md b/README.md index 6fe4b65..000b4ad 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # WordPress Nginx -This repository contains the Nginx configurations used within the series [Hosting WordPress Yourself](https://deliciousbrains.com/hosting-wordpress-setup-secure-virtual-server/). It contains best practices from various sources, including the [WordPress Codex](https://codex.wordpress.org/Nginx) and [H5BP](https://github.com/h5bp/server-configs-nginx). The following example sites are included: +This config kit contains the Nginx configurations used within the series [Install WordPress on Ubuntu 18.04](https://spinupwp.com/hosting-wordpress-yourself-ssl-spdy/). It contains best practices from various sources, including the [WordPress Codex](https://codex.wordpress.org/Nginx) and [H5BP](https://github.com/h5bp/server-configs-nginx). The following example sites are included: * [multisite-subdirectory.com](sites-available/multisite-subdirectory.com) - WordPress multisite install using subdirectories * [multisite-subdomain.com](sites-available/multisite-subdomain.com) - WordPress multisite install using subdomains @@ -10,24 +10,6 @@ This repository contains the Nginx configurations used within the series [Hostin ## Usage -### PHP configuration - -The php-fpm pool configuration is located in `global/php-pool.conf` and defaults to PHP 7.4. It will need modifying if you want the default php-fpm pool service to be a different PHP version. Additional PHP version upstream definitions can be added to the `/upstreams` folder (a PHP 7.3 sample is provided there). You can either use the default pool using `$upstream` in your nginx configurations or the specific upstream definition (i.e. php73, php72) setup by your custom upstream definitions. - -For example, currently the nginx configuration for `single-site.com` has the following set for php requests: - -``` -fastcgi_pass $upstream -``` - -You could change that to the following to use the php 7.3 PHP service instead (assuming that php7.3-fpm service is running). - -``` -fastcgi_pass php73 -``` - -This effectively allows you to have different server blocks execute different versions of PHP if needed. - ### Site configuration You can use these sample configurations as reference or directly by replacing your existing nginx directory. Follow the steps below to replace your existing nginx configuration. @@ -36,9 +18,7 @@ Backup any existing config: `sudo mv /etc/nginx /etc/nginx.backup` -Clone the repo: - -`sudo git clone https://github.com/A5hleyRich/wordpress-nginx.git /etc/nginx` +Copy these configs to `/etc/nginx`. Symlink the default file from _sites-available_ to _sites-enabled_, which will setup a catch-all server block. This will ensure unrecognised domains return a 444 response. @@ -60,11 +40,30 @@ Test the configuration: If the configuration passes, restart Nginx: -`sudo /etc/init.d/nginx reload` +`sudo service nginx reload` + +### PHP configuration + +The php-fpm pool configuration is located in `global/php-pool.conf` and defaults to PHP 7.4. It will need modifying if you want the default php-fpm pool service to be a different PHP version. Additional PHP version upstream definitions can be added to the `/upstreams` folder (a PHP 7.3 sample is provided there). You can either use the default pool using `$upstream` in your nginx configurations or the specific upstream definition (i.e. php73, php72) setup by your custom upstream definitions. + +For example, currently the nginx configuration for `single-site.com` has the following set for php requests: + +``` +fastcgi_pass $upstream +``` + +You could change that to the following to use the php 7.3 PHP service instead (assuming that php7.3-fpm service is running). + +``` +fastcgi_pass php73 +``` + +This effectively allows you to have different server blocks execute different versions of PHP if needed. + ## Directory Structure -This repository has the following structure, which is based on the conventions used by a default Nginx install on Debian: +This config kit has the following structure, which is based on the conventions used by a default Nginx install on Debian: ``` . @@ -87,7 +86,7 @@ __sites-enabled__ - symlinks to configurations within the `sites-available` dire ### Recommended Site Structure -The following site structure is used throughout this repository: +The following site structure is used throughout these configs: ``` .