Adding Custom NGINX Configs
It is possible to add custom NGINX directives without directly modifying our NGINX configuration files.
You can place your directives in any of the following folders:
- /etc/nginx/userconfigs/http
- /etc/nginx/userconfigs/server
- /etc/nginx/userconfigs/site
Directives in the/etc/nginx/userconfigs/http folder are included in our configs in the http block.
Directives in the /etc/nginx/userconfigs/server folder are included close to the top of the server block for each individual site.
Directives in the /etc/nginx/userconfigs/site folder are included close to the bottom of the server block for each individual site. However, in this case, only files that are prefixed with the domain name are included. The include statement we use for this is:
include /etc/nginx/userconfigs/site/$domain-*.conf;
After adding files to those folders, don’t forget to restart NGINX to activate the new settings.
service nginx restart
More Topics In Admin
-
Restoring From AWS S3 Into A New Site or Server -
Backups With AWS S3 -
Restoring From Backup -
6G Firewall -
7G Firewall -
Native Linux Cron -
Disabling Sites -
Password Protect A Site (HTTP Authentication) -
One-click Login (AKA Passwordless Logins) -
Remove/Delete Site -
Add A WordPress Administrator -
Manage PHP Options -
Notifications and Alerts -
Managing WordPress DEBUG Flags -
Object Cache: MemCached -
Object Cache: Redis -
Monit / Healing -
DNS Integration: CloudFlare -
Site Packages -
Site Update Plans -
Custom Servers (Bring Your Own Server) -
How To Change The IP Address For Your Server -
Virtual Cloud Providers -
Monitorix -
PHPMyAdmin – Database Operations -
Using Remote Databases -
SMTP Gateway -
Server Updates -
Theme & Plugin Updates -
Bulk Actions on Servers -
Bulk Actions on Sites -
Webserver Types -
SSH Key Overrides -
WPCD Cron Jobs -
Disk Quotas -
Using Post-Processing Custom Bash Scripts -
Copy To Server (Automated Daily Process) -
Bootstrapping A WordPress Server With Our Scripts -
Bootstrapping A WordPress Server With Our Scripts – Archive Version 4.x