ssl-fastcgi-cache.com changed to single-site-with-caching.com
This commit is contained in:
parent
297d184d1c
commit
c7ade05f3b
@ -4,9 +4,9 @@ This repository contains the Nginx configurations used within the series [Hostin
|
|||||||
|
|
||||||
* ssl.com - WordPress on HTTPS
|
* ssl.com - WordPress on HTTPS
|
||||||
* fastcgi-cache.com - WordPress with [FastCGI caching](https://deliciousbrains.com/hosting-wordpress-yourself-server-monitoring-caching/#page-cache)
|
* fastcgi-cache.com - WordPress with [FastCGI caching](https://deliciousbrains.com/hosting-wordpress-yourself-server-monitoring-caching/#page-cache)
|
||||||
* ssl-fastcgi-cache.com - WordPress on HTTPS with FastCGI caching
|
|
||||||
* multisite-subdomain.com - WordPress Multisite install using subdomains
|
* multisite-subdomain.com - WordPress Multisite install using subdomains
|
||||||
* multisite-subdirectory.com - WordPress Multisite install using subdirectories
|
* multisite-subdirectory.com - WordPress Multisite install using subdirectories
|
||||||
|
* single-site-with-caching.com - WordPress single site install with FastCGI caching
|
||||||
* single-site-no-ssl.com - WordPress single site install (no SSL or page caching)
|
* single-site-no-ssl.com - WordPress single site install (no SSL or page caching)
|
||||||
|
|
||||||
Looking for a modern hosting environment provisioned using Ansible? Check out [WordPress Ansible](https://github.com/A5hleyRich/wordpress-ansible).
|
Looking for a modern hosting environment provisioned using Ansible? Check out [WordPress Ansible](https://github.com/A5hleyRich/wordpress-ansible).
|
||||||
|
|||||||
2
sites-available/.gitignore
vendored
2
sites-available/.gitignore
vendored
@ -9,4 +9,4 @@
|
|||||||
!multisite-subdomain.com
|
!multisite-subdomain.com
|
||||||
!single-site-no-ssl.com
|
!single-site-no-ssl.com
|
||||||
!ssl.com
|
!ssl.com
|
||||||
!ssl-fastcgi-cache.com
|
!single-site-with-caching.com
|
||||||
@ -1,7 +1,7 @@
|
|||||||
# Define path to cache and memory zone. The memory zone should be unique.
|
# Define path to cache and memory zone. The memory zone should be unique.
|
||||||
# keys_zone=ssl-fastcgi-cache.com:100m creates the memory zone and sets the maximum size in MBs.
|
# keys_zone=single-site-with-caching.com:100m creates the memory zone and sets the maximum size in MBs.
|
||||||
# inactive=60m will remove cached items that haven't been accessed for 60 minutes or more.
|
# inactive=60m will remove cached items that haven't been accessed for 60 minutes or more.
|
||||||
fastcgi_cache_path /sites/ssl-fastcgi-cache.com/cache levels=1:2 keys_zone=ssl-fastcgi-cache.com:100m inactive=60m;
|
fastcgi_cache_path /sites/single-site-with-caching.com/cache levels=1:2 keys_zone=single-site-with-caching.com:100m inactive=60m;
|
||||||
|
|
||||||
server {
|
server {
|
||||||
# Ports to listen on, uncomment one.
|
# Ports to listen on, uncomment one.
|
||||||
@ -9,21 +9,21 @@ server {
|
|||||||
listen [::]:443 ssl http2;
|
listen [::]:443 ssl http2;
|
||||||
|
|
||||||
# Server name to listen for
|
# Server name to listen for
|
||||||
server_name ssl-fastcgi-cache.com;
|
server_name single-site-with-caching.com;
|
||||||
|
|
||||||
# Path to document root
|
# Path to document root
|
||||||
root /sites/ssl-fastcgi-cache.com/public;
|
root /sites/single-site-with-caching.com/public;
|
||||||
|
|
||||||
# Paths to certificate files.
|
# Paths to certificate files.
|
||||||
ssl_certificate /etc/letsencrypt/live/ssl-fastcgi-cache.com/fullchain.pem;
|
ssl_certificate /etc/letsencrypt/live/single-site-with-caching.com/fullchain.pem;
|
||||||
ssl_certificate_key /etc/letsencrypt/live/ssl-fastcgi-cache.com/privkey.pem;
|
ssl_certificate_key /etc/letsencrypt/live/single-site-with-caching.com/privkey.pem;
|
||||||
|
|
||||||
# File to be used as index
|
# File to be used as index
|
||||||
index index.php;
|
index index.php;
|
||||||
|
|
||||||
# Overrides logs defined in nginx.conf, allows per site logs.
|
# Overrides logs defined in nginx.conf, allows per site logs.
|
||||||
access_log /sites/ssl-fastcgi-cache.com/logs/access.log;
|
access_log /sites/single-site-with-caching.com/logs/access.log;
|
||||||
error_log /sites/ssl-fastcgi-cache.com/logs/error.log;
|
error_log /sites/single-site-with-caching.com/logs/error.log;
|
||||||
|
|
||||||
# Default server block rules
|
# Default server block rules
|
||||||
include global/server/defaults.conf;
|
include global/server/defaults.conf;
|
||||||
@ -51,32 +51,27 @@ server {
|
|||||||
fastcgi_no_cache $skip_cache;
|
fastcgi_no_cache $skip_cache;
|
||||||
|
|
||||||
# Define memory zone for caching. Should match key_zone in fastcgi_cache_path above.
|
# Define memory zone for caching. Should match key_zone in fastcgi_cache_path above.
|
||||||
fastcgi_cache ssl-fastcgi-cache.com;
|
fastcgi_cache single-site-with-caching.com;
|
||||||
|
|
||||||
# Define caching time.
|
# Define caching time.
|
||||||
fastcgi_cache_valid 60m;
|
fastcgi_cache_valid 60m;
|
||||||
}
|
}
|
||||||
|
|
||||||
# Uncomment if using the fastcgi_cache_purge module and Nginx Helper plugin (https://wordpress.org/plugins/nginx-helper/)
|
|
||||||
# location ~ /purge(/.*) {
|
|
||||||
# fastcgi_cache_purge ssl-fastcgi-cache.com "$scheme$request_method$host$1";
|
|
||||||
# }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# Redirect http to https
|
# Redirect http to https
|
||||||
server {
|
server {
|
||||||
listen 80;
|
listen 80;
|
||||||
listen [::]:80;
|
listen [::]:80;
|
||||||
server_name ssl-fastcgi-cache.com www.ssl-fastcgi-cache.com;
|
server_name single-site-with-caching.com www.single-site-with-caching.com;
|
||||||
|
|
||||||
return 301 https://ssl-fastcgi-cache.com$request_uri;
|
return 301 https://single-site-with-caching.com$request_uri;
|
||||||
}
|
}
|
||||||
|
|
||||||
# Redirect www to non-www
|
# Redirect www to non-www
|
||||||
server {
|
server {
|
||||||
listen 443;
|
listen 443;
|
||||||
listen [::]:443;
|
listen [::]:443;
|
||||||
server_name www.ssl-fastcgi-cache.com;
|
server_name www.single-site-with-caching.com;
|
||||||
|
|
||||||
return 301 https://ssl-fastcgi-cache.com$request_uri;
|
return 301 https://single-site-with-caching.com$request_uri;
|
||||||
}
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user