Once these steps were followed we were able to create subdirectory sites but users were stuck in a redirect loop when attempting to access the dashboard for subdirectory network sites. Since the new WordPress Azure app uses nginx we needed to make the following updates:
1. Create a nginx.conf file based on the file found at /etc/nginx/conf.d/default.conf and place it in /home/site/wwwroot
2. Add the lines necessary for multisite directly below 'index index.php;' on line 14. We used an FTP client for this.
if (!-e $request_filename) {
rewrite /wp-admin$ $scheme://$host$request_uri/ permanent;
rewrite ^(/[^/]+)?(/wp-.*) $2 last;
rewrite ^(/[^/]+)?(/.*\.php) $2 last;
}
3. Update /dev/startup.sh to contain:
cp /home/site/wwwroot/nginx.conf /etc/nginx/conf.d/default.conf
/usr/sbin/nginx -s reload
4. Stop and start the app to load the new configuration (or run the commands from 3 in the SSH terminal)
We referenced this document for the multisite configurations: Nginx – Advanced Administration Handbook | Developer.WordPress.org and this document for how to update the app's nginx configuration: wordpress-linux-appservice/WordPress/configuring_nginx_for_wordpress.md at main · Azure/wordpress-linux-appservice · GitHub