The MU forums have moved to WordPress.org

What is the purpose of the VHOST constant and when should it be 'no' or 'yes' (11 posts)

  1. enknot
    Member
    Posted 14 years ago #

    The short version of the question is: "When should I set the value of the VHOST constant to 'yes' and/or 'no'?"

    I don't know what it's for. I've spent quite a bit of time trying to track down what it is for already, so now I'm asking you guys, and one of my installations won't run properly unless it's set to 'no', but the other copy (which is a svn'd mirror image) works with it set to 'yes'. When the malfunctioning copy is set to 'yes' it has a "Redirect Loop" error and the url looks like this http://mysite/wp_signup.php?new=mysite

    I'll post a comment with what line of code I figured was causing this. It might help determine cause of the settings bug.

  2. dsader
    Member
    Posted 14 years ago #

    VHOST = virtual hosts, aka ServerAlias, aka Wildcard DNS

    http://trac.mu.wordpress.org/browser/trunk/README.txt

    If "no" blog urls look like http://mysite.tld/blog1 aka "sub-directories"

    If "yes" blog urls look like http://blog1.mysite.tld aka "sub-domains"

    Changing the vhost constant after install by editing only the wp-config.php is much more fun than simply removing the wp-config.php and starting the install over from scratch.

  3. devrim
    Member
    Posted 14 years ago #

    Changing the vhost constant after install by editing only the wp-config.php is much more fun than simply removing the wp-config.php and starting the install over from scratch.

    Hi dsader, I unfortunately must be involved in that fun activity you mentioned. I changed the (VHOST,no) but it keeps on creating blogs as usual: <blog>.domain instead of domain/<blog>

    What is the procedure of changing this setting after install ?

    Thanks,
    D

  4. andrea_r
    Moderator
    Posted 14 years ago #

    Is this a live site with blogs you need to maintain?

  5. devrim
    Member
    Posted 14 years ago #

    Yes I need to maintain some blogs, but I am more interested in the procedure. Could you tell me more ?

  6. andrea_r
    Moderator
    Posted 14 years ago #

    No, I mean are there blog currently present that you need to KEEP.

    The procedure is different if it is a fresh install.

  7. cullaloe
    Member
    Posted 14 years ago #

    @andrea_r I'd be interested in the answer to this: I'm on shared hosting and would like to try Donncha's domain mapping plugin. My install is VHOST="no" (I think because I preferred subdirectories for blogs when I installed) but this is preventing the plugin from working *I think*.

    If I change it to "yes", the page/blog links go to 404 (but the plugin looks like it will work :D)

    Several of the blogs here have content and comments (on blogs on one domain: mrhood.net) that I need to keep. I'd like to use the same installation for a new (parked) domain but blogs on the new domain (scottishcoastalrowing.org) just render the home page/post whatever is requested in the browser. I thought the domain mapper might be a solution.

    Much as I'd love one, I can't fund dedicated hosting (nor the time off work I'd take playing with it).

    Any help, much appreciated.

    Nick

  8. andrea_r
    Moderator
    Posted 14 years ago #

    You're correct - vhost control weather the blogs are subdomain or subfolder. Donncha's domain mapping only works on subdomain setups.

    Actually, there are a quite a number of hosts that do support wildcard subdomains without being dedicated servers.

    You can also use a multi-site plugin, which will do what you want (and it makes each domain mapped blog its own MU site, so you can have blogs off that).

    And there's a paid version, which does work on subfolder blogs. wpmututorials.com/simple-multi-site-plugin-e-book/

  9. cullaloe
    Member
    Posted 14 years ago #

    Thanks, @andrea_r, I'm assuming that having set up the existing blogs as subfolder, it's a pain in the quadripedal equine to change them to subdomain?

    I'm stuck with the problem that the main site blogs all work nicely but that using the multi-site plugin, the parked domain blogs don't - any attempt to navigate to pages below the root (e.g. http://scottishcoastalrowing.org/about) just renders (redirects to) the home page, i.e. http://scottishcoastalrowing.org/ ... I can reach http://http://scottishcoastalrowing.org/wp-admin ok.

    I've asked the hosting technical support if they can identify any reason for this - specifically what difference in the configs (I can't see) exists between http://mrhood.net and http://scottishcoastalrowing.org

    I'll post what they find here in case it helps anyone else.

  10. andrea_r
    Moderator
    Posted 14 years ago #

    "having set up the existing blogs as subfolder, it's a pain in the quadripedal equine to change them to subdomain?"

    Yep. :) You'd have to run though every single blog, with every single instance of their name, and change it.

    We wrote a script to do it, but it's unreleased. (mostly because you only need it once in limited circumstances)

    "using the multi-site plugin..."

    which one? :) There's three different ones, last I knew of. :D

    It's mostly likely a server issue tho.

  11. cullaloe
    Member
    Posted 14 years ago #

    The answer was (probably) finger trouble. I deleted the new domain from wpmu, and the hosting "parked" domains list and started over. This time, I cloned the main blog settings when creating the new domain and bingo - all working fine now.

    The multi site plugin I'm using is Dean's: http://www.jerseyconnect.net/development/

    I'm going to stick with subfolder domains, not going to risk breaking it all by trying to change it.

    Thanks for your help.

About this Topic