• Resolved lohray

    (@lohray)


    Hi,

    I am trying to setup multiple subdomains to be able to access a single WP installation. However, I would like to have my users have their separate sets of folders too.

    If I put in a wild card serverAlias in the apache httpd virtual host section, all subdomains (each belonging to a different user) shall share a common DocumentRoot (undesirable). Is there a way to get around this?

    What I tried on my domain tree:

    domain.com/wpress ->The actual Installation (Blog 1)
    user1.domain.com/wpress -> A subdomain installation (Blog 2)
    user2.domain.com -> (Blog 3) Note there is no /wpress folder.

    Here, the DocumentRoot of user2 is a symbolic link to domain.com/wpress. Logging in causes it look for user2.domain.com/wpress/wp-admin although the blog renders at user2.domain.com

    This led me to create another symbolic link called wpress in the wpress folder linking it to itself. Things either ended up with a 500 error or an infinite loop of login forms.

    Does anyone have any suggestions to achieve the desired effect (keep user spaces separate) ?

Viewing 1 replies (of 1 total)
  • Thread Starter lohray

    (@lohray)

    I got it!

    The main installation is at https://domain.com/weblog

    I do not follow the codex to the letter and create a virtual directory section without a wildcard. Now I have a subdomain https://user1.domain.com/ that does not hare the document root with the main WP installation.

    To get WP working:

    1. Create a symbolic link in the DocumentRoot of user1.domain.com to the installation directory.

    Place the following .htaccess file in the document root of user1.domain.com

    RewriteEngine On
    RewriteBase /
    RewriteRule ^wp-admin(.*)$ weblog/wp-admin$1 [R=301,L]
    RewriteRule ^(.+)$ /weblog/$1 [L]
    RewriteRule ^(.?)$ /weblog/$1 [L]

    Things seem to be working so far without any problems logging in.

Viewing 1 replies (of 1 total)
  • The topic ‘Multiple Blogs without wildcard DNS’ is closed to new replies.