You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+5-8
Original file line number
Diff line number
Diff line change
@@ -2,31 +2,28 @@
2
2
3
3
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:
4
4
5
-
* fastcgi-cache.com - WordPress with [FastCGI caching](https://deliciousbrains.com/hosting-wordpress-yourself-server-monitoring-caching/#page-cache)
6
5
* multisite-subdirectory.com - WordPress multisite install using subdirectories
7
6
* multisite-subdomain.com - WordPress multisite install using subdomains
8
7
* single-site.com - WordPress single site install
9
8
* single-site-with-caching.com - WordPress single site install with FastCGI caching
10
9
* single-site-no-ssl.com - WordPress single site install (no SSL or page caching)
11
10
12
-
Looking for a modern hosting environment provisioned using Ansible? Check out [WordPress Ansible](https://github.com/A5hleyRich/wordpress-ansible).
13
-
14
11
## Usage
15
12
16
13
### PHP configuration
17
14
18
-
The php-fpm pool configuration is located in `global/php-pool.conf` and defaults to PHP 7.1. It will need modified 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.0 sample is provided there). You can either use the default pool using `$upstream` in your nginx configurations or the specific upstream definition (i.e. php71, php70) setup by your custom upstream definitions.
15
+
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.
19
16
20
-
For example, currently the nginx configuration for `singlesite.com` has the following set for php requests:
17
+
For example, currently the nginx configuration for `single-site.com` has the following set for php requests:
21
18
22
19
```
23
20
fastcgi_pass $upstream
24
21
```
25
22
26
-
You could change that to the following to use the php 7.0 php service instead (assuming that php7.0-fpm service is running).
23
+
You could change that to the following to use the php 7.3 PHP service instead (assuming that php7.3-fpm service is running).
27
24
28
25
```
29
-
fastcgi_pass php70
26
+
fastcgi_pass php73
30
27
```
31
28
32
29
This effectively allows you to have different server blocks execute different versions of PHP if needed.
@@ -49,7 +46,7 @@ Symlink the default file from _sites-available_ to _sites-enabled_, which will s
49
46
50
47
Copy one of the example configurations from _sites-available_ to _sites-available/yourdomain.com_:
0 commit comments