Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the zero-bs-crm domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /var/www/html/codemilitant/wp-includes/functions.php on line 6121

Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the woocommerce domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /var/www/html/codemilitant/wp-includes/functions.php on line 6121

Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the woocommerce-subscriptions domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /var/www/html/codemilitant/wp-includes/functions.php on line 6121

Warning: Undefined array key "scheme" in /var/www/html/codemilitant/wp-content/plugins/jetpack-boost/app/modules/image-size-analysis/Image_Size_Analysis_Fixer.php on line 30

Warning: Undefined array key "scheme" in /var/www/html/codemilitant/wp-content/plugins/jetpack-boost/app/modules/image-size-analysis/Image_Size_Analysis_Fixer.php on line 30
Nginx Multisite and WordPress Block Themes – CodeMilitant

WP Engine Customers

Migrate Your WordPress Website FREE Click Here

Nginx Multisite and WordPress Block Themes


, ,
CodeMilitant Solutions for Linux Nginx Python PHP Bash MariaDB

When setting up Nginx to run with WordPress Multisite, it’s vital that each sub-domain have it’s own Nginx configuration:

map $http_host $blogid {
    default			0;
    example.com			1;
    ### the numbers represent the blod id and the fqdn of the domain pointed at this multisite instance
    food.example.com		2;
    clothing1.example.com	3;
    # clothing2.example.com	3;
    # shelter.examplet.com	4;
}

Then each subdomain for the Multisite should be:

##  FOOD SSL SERVER
server {
    listen 443 ssl;
    server_name food.example.com;

    include global/wp_multisite.conf;
    include global/http_headers.conf;
    include ssl/ssl_localhost.conf;
    include global/compression.conf;

    location / {
        proxy_set_header Host $host;
	proxy_set_header X-Real-IP $remote_addr;
	proxy_set_header  X-Forwarded-For $remote_addr;
	proxy_set_header  X-Forwarded-Host $host;
	proxy_set_header X-Forwarded-Proto $scheme;
        proxy_pass http://foodsites;
    }
    access_log  /var/log/nginx/example.access.log main;
    error_log  /var/log/nginx/example.error.log error;
}

Failure to add the Nginx configs above will result in custom CSS and functions.php failing to load for each designated subsite. The CSS and custom functions.php will load from the first previous subsite configured in Nginx.