When using the vvv-nginx-custom.conf
file to override the default settings, do you need to keep the same format as default? Does it need to include everything default has as well?
I'm a little confused or maybe I misunderstood the directions.
Default file configuration:
server {
listen 80;
listen 443 ssl http2;
server_name {vvv_hosts};
root {vvv_path_to_site}{vvv_public_dir};
# Nginx logs
error_log {vvv_path_to_site}/log/nginx-error.log;
access_log {vvv_path_to_site}/log/nginx-access.log;
# This is needed to set the PHP being used
set $upstream {upstream};
# Enable server push if SSL/HTTP2 is being used for link preload headers
http2_push_preload on;
{vvv_tls_cert}
{vvv_tls_key}
# Nginx rules for WordPress, rewrite rules, permalinks, etc
include /etc/nginx/nginx-wp-common.conf;
{{LIVE_URL}}
location ~* \.(css|eot|gif|ico|jpeg|jpg|js|png|svg|tiff|tiff|ttf|webp|woff|woff2)$ {
expires 100d;
}
}
Does this mean the customized one would need to look like this?
server {
listen 80;
listen 443 ssl http2;
server_name {vvv_hosts};
root {vvv_path_to_site}{vvv_public_dir};
# Nginx logs
error_log {vvv_path_to_site}/log/nginx-error.log;
access_log {vvv_path_to_site}/log/nginx-access.log;
# This is needed to set the PHP being used
set $upstream {upstream};
# Enable server push if SSL/HTTP2 is being used for link preload headers
http2_push_preload on;
{vvv_tls_cert}
{vvv_tls_key}
# Nginx rules for WordPress, rewrite rules, permalinks, etc
include /etc/nginx/nginx-wp-common.conf;
{{LIVE_URL}}
location ~* \.(css|eot|gif|ico|jpeg|jpg|js|png|svg|tiff|tiff|ttf|webp|woff|woff2)$ {
expires 100d;
}
# Custom rules
install_plugins: # Various way to install a plugin
- query-monitor
- classic-editor
- wordpress-seo
- all-in-one-wp-migration
- timber-library
wpconfig_constants:
WP_DEBUG: true
WP_DEBUG_LOG: true
WP_DISABLE_FATAL_ERROR_HANDLER: true # To disable in WP 5.2 the FER mode
}