Skip to content

Quick deployment of Nginx, MariaDB, Wordpress FPM and Adminer using Docker Compose.

Notifications You must be signed in to change notification settings

encryptize/wordpress-compose

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

79 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WordPress Nginx

This config kit contains the Nginx configurations used in the Install WordPress on Ubuntu 22.04 guide. It contains best practices from various sources, including the WordPress Codex and H5BP. The following example sites are included:

Usage

Site configuration

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.

ln -s ../sites-available/default ./nginx/sites-enabled/default

Copy one of the example configurations from sites-available to sites-available/yourdomain.com:

cp ./nginx/sites-available/single-site.com ./nginx/sites-available/yourdomain.com

Edit the site accordingly, paying close attention to the server name and paths.

To enable the site, symlink the configuration into the sites-enabled directory:

ln -s ../sites-available/yourdomain.com ./nginx/sites-enabled/yourdomain.com

Restart Nginx:

docker compose restart nginx

Directory Structure

This config kit has the following structure, which is based on the conventions used by a default Nginx install on Debian:

.
├── conf.d
├── global
    └── server
├── sites-available
├── sites-enabled

conf.d - configurations for additional modules.

global - configurations within the http block.

global/server - configurations within the server block. The defaults.conf file should be included on the majority of sites, which contains sensible defaults for caching, file exclusions and security. Additional .conf files can be included as needed on a per-site basis.

sites-available - configurations for individual sites (virtual hosts).

sites-enabled - symlinks to configurations within the sites-available directory. Only sites which have been symlinked are loaded.

About

Quick deployment of Nginx, MariaDB, Wordpress FPM and Adminer using Docker Compose.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • DIGITAL Command Language 100.0%