The MU forums have moved to

wp_blog Path is / for all blogs (8 posts)

  1. musnake
    Posted 12 years ago #


    WPMU 2.3.3
    Apache version 1.3.37 (Unix)
    PHP version 4.4.4
    MySQL version 4.1.22-standard
    Architecture i686
    Operating system Linux

    Shared hosting, wildcard DNS allegedly enabled, cPanel only.

    WPMU installed in domain root. subdomain method.

    Test URL (will delete soon):

    Now, I'm trying to debug what I think are .htaccess issues but let me first eliminate WPMU config issues...

    From the WPMU Site Admin, I can create blogs and have new users automagically created.
    The two "New Blog" notification emails to the WPMU site admin are received.

    Once the blog is created, it shows up in the list of blogs. If I 'View" the site, I get a "Internet Explorer cannot display the webpage"/not quite blank page.

    The same occurs for the "Backend" link.

    The links appear to be generated correctly, with trailing slashes too:

    Now, from the WPMU Site Admin Blogs list, if "Edit" the blog, I notice that the "Domain" value is set to "" and "Path" is set to "/"

    A peek in the database table wp_blogs shows that the path value is "/" for all the blogs.

    Is this correct? I had expected to see the name of the blog appear in the path as a reference to the virtual subdomain thingamajig...

    My .htaccess in the domain root is as follows:

    RewriteEngine On
    RewriteBase /

    # Rewrite to
    RewriteCond %{HTTP_HOST} ^www.(.*)
    RewriteRule ^(.*) http://%1/$1 [R,L]

    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule . - [L]
    RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-.*) $2 [L]
    RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
    RewriteRule . index.php [L]

    #uploaded files
    RewriteRule ^(.*/)?files/$ index.php [L]
    RewriteRule ^(.*/)?files/(.*) wp-content/blogs.php?file=$2 [L]

  2. creivox
    Posted 12 years ago #

    I just installed MU and I am having the exact same issue. Does anyone have a solution.

  3. lunabyte
    Posted 12 years ago #

    "A peek in the database table wp_blogs shows that the path value is "/" for all the blogs.

    Is this correct? I had expected to see the name of the blog appear in the path as a reference to the virtual subdomain thingamajig..."

    Yes, that is correct. This is because the domain being served is username.whatever.tld, from the root directory which is "/".

    If you were in subdirectory mode, the domain would always be the same (whatever.tld) and the path would be /username/.

    What the problem is, and I'd probably put money on it in Vegas, is that the environment needed to support a subdomain install of MU was not properly configured.

    Problem 1) Apache.
    The virtual host was not properly modified to support MU running in subdomain mode. It HAS to be modified with a proper ServerAlias, directory options with symlinks and allow override, etc. It's all in the readme.

    Problem 2) Shared hosting.
    It just isn't smart to run MU on shared hosting. We've beat this horse to death in numerous threads.

    However, when it comes to shared hosting and cPanel, a lot of the hosts out there are VERY unwilling to make changes to Apache's configuration to support someone running MU. Why? Most of them aren't up to speed with how to do it, and making custom changes like those required for MU for a single virtual host can be intimidating to most of the idiot hosts out there. Most of them barely know what they're doing, and cPanel just baby's them along.

    Taking into account that you can't access username.whatever.tld, and that you do (so you say) have the wildcard DNS entry in place, that leaves Apache not knowing to answer for any subdomain on your primary domain as the most likely culprit behind this.

    Your htaccess looks like every other one out there for MU. They are all the same overall. Nothing special here, other than a difference in the rewrite path (which can be different on some installs that try to put it in a subdir off of root), and the domain.

    So, you most likely didn't comprehend the readme file well enough to get everything squared away with all the settings required. For Apache, you would have had to work with your host and they would have to make to modifications. If this wasn't done, it would produce the problems you are experiencing with your site.

    If they made the changes directly to httpd.conf, chances are cPanel (technically WHM, but whatever) overwrote those changes as per the way that hosting platform works.

    They would have to set up special inclusion files, which should then work every time WHM/cPanel modifies httpd.conf on its own behind the scene. But, I'm not here to school a host, just here to let you know what doesn't appear to be done on your hosts end so your site works.

    You may however wish to review their TOS, and fully ensure that running MU will not violate it. It definitely does violate more shared hosting TOS than it doesn't.

  4. andrea_r
    Posted 12 years ago #

    lunabyte, your post should be stickied, in the readme or in the codex. :)

    Nice thorough explanation.

  5. musnake
    Posted 12 years ago #


    Well the ongoing host support issues continue. I find myself having to continually spoonfeed them URL to the readme/Apache docs/matt's subdomain article etc. Lot's of " you may have noticed earlier in the ticket thread, I said < blah > ..."

    They are ok with running WPMU on my reseller account (still essentially shared hosting as opposed to a dedicated server).

    The blank page is now an Apache splash page of sorts.

    The hair in the creme brulee may be that I asked for several domains that are already setup for Google App's to be protected from any global redirects.

    How frustrating.

    Thanks to the Vets for taking a look up my host's *ss.

  6. musnake
    Posted 12 years ago #

    In the hopes that this helps someone else communicate with their host, behold the latest support ticket:

    I hate pushing the timestamp on this ticket back, but it will be worse for me if I don't share all the info' I have.

    Maybe this will help...

    Which suggests improving the current httpd.conf setting to: (remove extra space in VirtualHost tag!) :

    < VirtualHost >
    DocumentRoot /home/benefact/public_html
    BytesLog domlogs/
    User benefact
    Group benefact
    ServerAlias *
    CustomLog domlogs/ combined
    RedirectMatch 301 (.*)$1
    < /VirtualHost >

    If that results in the cPanel page being displayed, try this version:

    < VirtualHost >
    DocumentRoot /home/benefact/public_html
    BytesLog domlogs/
    User benefact
    Group benefact
    ServerAlias *
    CustomLog domlogs/ combined
    RedirectMatch 301 (.*)$1
    < /VirtualHost >

    There are others with WPMU running on reseller accounts here at XXXXXX.
    How is their setup different?

    I don't think there is any information here that can't be looked up/figured out.

    If anyone sees something that's on fire, please share...

    cPanel must be the AOL of the hostingsphere... I feel shame.

  7. lunabyte
    Posted 12 years ago #

    If they edit the virtual host directly, once cPanel/WHM adds a new vhost or modifies an existing one, any direct edits will be lost.

    If they don't know how to work around that, they can google it.

    I will note that this is valid for up to date cPanel/WHM installs. Older (and insecure) ones do not have this issue. (The ones still using Apache 1.3.x, for example.)

  8. musnake
    Posted 12 years ago #

    Schweet. Thanks for the data. It looks like they got 99% of it working. I can crate blogs/subdomains etc as expected. The only two things (that I am aware of) is trying to figure out Matt's 301 redirect for old/bad subdomains and this cPanel issue you've raised. I'll let them know.


    < crashes int 9>

About this Topic