I thought it might be possible to set up a multisite using subdomains and then override the site age requirement and switch it the setup to use subfolders, but so far I haven’t had any luck.
You can do that.
1) Create a Multisite as subdomains (trust me).
2) Edit WP-config and change define('SUBDOMAIN_INSTALL', true);
to false
3) Go to /wp-admin/network/setup.php and you should see the new nginx conf.
Thanks for the reply. I’ve already completed those steps, with no problems, but on step 3, it displays .htacess rules, not nginx conf. I found an nginx version that I used, but like I said in my original post, I’m getting into a redirect loop when I try to go to the admin dashboard of any of the new sites I create.
Also, I just noticed another thing that may be a problem.
Warning: Subdirectory networks may not be fully compatible with custom wp-content directories.
I’ve got a custom wp-content directory too. WordPress is installed at /wordpress/ and the /wp-content/ directory is a sibling of that, /wp-content/. I originally had it set up that way so that I could keep my git repositories out of the WordPress repo.
Just for reference, here is the nginx config that I have;
server {
##DM - uncomment following line for domain mapping
#listen 80 default_server;
server_name domain.dev *.domain.dev ;
##DM - uncomment following line for domain mapping
#server_name_in_redirect off;
access_log /var/log/nginx/domain.dev.access.log;
error_log /var/log/nginx/domain.dev.error.log;
root /var/www/domain.dev/htdocs;
index index.php;
if (!-e $request_filename) {
rewrite /wp-admin$ $scheme://$host$uri/ permanent;
rewrite ^(/[^/]+)?(/wp-.*) $2 last;
rewrite ^(/[^/]+)?(/.*\.php) $2 last;
}
set $cache_uri $request_uri;
# POST requests and urls with a query string should always go to PHP
if ($request_method = POST) {
set $cache_uri 'NULL';
}
if ($query_string != "") {
set $cache_uri 'NULL';
}
# Don't cache uris containing the following segments
if ($request_uri ~* "(/wp-admin/|/xmlrpc.php|/wp-(app|cron|login|register|mail).php|wp-.*.php|/feed/|index.php|wp-comments-popup.php|wp-links-opml.php|wp-locations.php|sitemap(_index)?.xml|[a-z0-9_-]+-sitemap([0-9]+)?.xml)") {
set $cache_uri 'NULL';
}
# Don't use the cache for logged in users or recent commenters
if ($http_cookie ~* "comment_author|wordpress_[a-f0-9]+|wp-postpass|wordpress_logged_in") {
set $cache_uri 'NULL';
}
# Use cached or actual file if they exists, otherwise pass request to WordPress
location / {
try_files /wp-content/cache/page_enhanced/${host}${cache_uri}_index.html $uri $uri/ /index.php?$args ;
}
location ~ \.php$ {
try_files $uri /index.php;
include fastcgi_params;
fastcgi_pass unix:/var/run/php5-fpm.sock;
}
location ~* ^.+\.(ogg|ogv|svg|svgz|eot|otf|woff|mp4|ttf|rss|atom|jpg|jpeg|gif|png|ico|zip|tgz|gz|rar|bz2|doc|xls|exe|ppt|tar|mid|midi|wav|bmp|rtf)$ {
access_log off; log_not_found off; expires max;
}
location = /robots.txt { access_log off; log_not_found off; }
location ~ /\. { deny all; access_log off; log_not_found off; }
}
(I replaced the domain in that sample with ‘domain.dev’)
Grrr. I thought they added in nginx….
http://wordpress.org/support/topic/nginx-rewrite-rule-for-wordpress-3-multisite?replies=16 ? I honestly don’t know nginx enough to do that one…