directory - Subdirectory multisite installation with several domain names?

I work as a sysadmin at a large academic department. We have an apache httpd, with a WP subdirectory multisite installat

I work as a sysadmin at a large academic department. We have an apache httpd, with a WP subdirectory multisite installation, fronted by an apache reverse proxy. In this setup we want to allow our users to serve WP content under the main domain name (external, say) with their own name attached (user1):

The vhost config looks like

  # ...
  RequestHeader set X-Forwarded-Proto "https"

  ProxyPass        / /
  ProxyPassReverse / /
  ProxyPreserveHost On
  # ...

This allows us to assign users their own wp sites, as user1, with siteurl and host both set to , and they can edit and publish.

And we want to add sites for whole research projects, with their own domain names, that should be addressed as a bare domain name: . I've set the vhost config like this:

  # ...
  RequestHeader set X-Forwarded-Proto "https"

  ProxyPass        / 
  ProxyPassReverse / 
  ProxyPreserveHost On
  # ...

With siteurl and host both set to , this gives a 404 error on the root, with an 'Oops!' for the home page, and goes into 301 loops on permalinks.

With siteurl and host both set to , there is a redirect to the main site root when trying https://project1/, but the permalinks work ...

The rewrite rules look like

RewriteEngine On
RewriteBase /wpsites/
# if req NOT lastly from reverse proxy, redirect thru it
# -- 'cause direct access doesn't work
RewriteCond %{REMOTE_ADDR} !^111\.111\.111\.111$
RewriteRule ^(.*)$ /$1 [R=301,L]

RewriteRule ^index.php$ - [L]

# add a trailing slash to /wp-admin
RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]

RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]

RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
RewriteRule . index.php [L]

EDIT: additional configuration that may shed some light:

  • the WP site is in a subdirectory of the httpd docroot (it's implicitly mentioned above)
  • the domain is set to project1 and the path to / in the wp_blogs table

Is this possible, at all? How, in that case? Changes to the .htaccess file? To the vhost config? To the siteurl and host options? Move the site to the docroot? Change the domain/path values in the wp_blogs table?

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1742327927a4423123.html

相关推荐

  • directory - Subdirectory multisite installation with several domain names?

    I work as a sysadmin at a large academic department. We have an apache httpd, with a WP subdirectory multisite installat

    11小时前
    20

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信