diff --git a/README.md b/README.md index dfc4dcd..b2b6e0e 100644 --- a/README.md +++ b/README.md @@ -4,9 +4,9 @@ This repository contains the Nginx configurations used within the series [Hostin * ssl.com - WordPress on HTTPS * 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-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) Looking for a modern hosting environment provisioned using Ansible? Check out [WordPress Ansible](https://github.com/A5hleyRich/wordpress-ansible). diff --git a/sites-available/.gitignore b/sites-available/.gitignore index 3dbbf9a..24d7297 100644 --- a/sites-available/.gitignore +++ b/sites-available/.gitignore @@ -9,4 +9,4 @@ !multisite-subdomain.com !single-site-no-ssl.com !ssl.com -!ssl-fastcgi-cache.com \ No newline at end of file +!single-site-with-caching.com \ No newline at end of file diff --git a/sites-available/ssl-fastcgi-cache.com b/sites-available/single-site-with-caching.com similarity index 56% rename from sites-available/ssl-fastcgi-cache.com rename to sites-available/single-site-with-caching.com index 92096a1..9b3ac41 100644 --- a/sites-available/ssl-fastcgi-cache.com +++ b/sites-available/single-site-with-caching.com @@ -1,7 +1,7 @@ # 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. -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 { # Ports to listen on, uncomment one. @@ -9,21 +9,21 @@ server { listen [::]:443 ssl http2; # Server name to listen for - server_name ssl-fastcgi-cache.com; + server_name single-site-with-caching.com; # Path to document root - root /sites/ssl-fastcgi-cache.com/public; + root /sites/single-site-with-caching.com/public; # Paths to certificate files. - ssl_certificate /etc/letsencrypt/live/ssl-fastcgi-cache.com/fullchain.pem; - ssl_certificate_key /etc/letsencrypt/live/ssl-fastcgi-cache.com/privkey.pem; + ssl_certificate /etc/letsencrypt/live/single-site-with-caching.com/fullchain.pem; + ssl_certificate_key /etc/letsencrypt/live/single-site-with-caching.com/privkey.pem; # File to be used as index index index.php; # Overrides logs defined in nginx.conf, allows per site logs. - access_log /sites/ssl-fastcgi-cache.com/logs/access.log; - error_log /sites/ssl-fastcgi-cache.com/logs/error.log; + access_log /sites/single-site-with-caching.com/logs/access.log; + error_log /sites/single-site-with-caching.com/logs/error.log; # Default server block rules include global/server/defaults.conf; @@ -51,32 +51,27 @@ server { fastcgi_no_cache $skip_cache; # 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. 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 server { 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 server { 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; } \ No newline at end of file