61 pointsSerious WPMU DEV-sterI'm new here
johnnytee
Member
—
4th February 2009 00:47
How do I implement existing sub domains. So I want forums.domain.com to goto bbpress and not mu. I have this in my .htaccess. With bbpress being a symlink under mu pointing to bbpress
How do I implement existing sub domains. So I want forums.domain.com to goto bbpress and not mu. I have this in my .htaccess. With bbpress being a symlink under mu pointing to bbpress
Easiest way is to have the virtual host for "forums.domain.tld" come before the main MU virtual host in your httpd.conf file.
Then the forum would have it's own path on the file system, separate from the MU file path. Plus you skip the additional overhead from the htaccess addition.
I did this and it works great but now my mapped domains go to the forum... Any ideas on how to avoid this. According to the Domain Mapping plugin "Make sure the default Apache virtual host points at your WordPress MU site so it will handle unknown domains correctly."
Right now forums is the default since it comes first?
# MU (gotta come last, to be safe)
<VirtualHost *>
DocumentRoot /path/to/mu_site
ServerName domain.tld
ServerAlias *.domain.tld domain2.tld http://www.domain2.tldhttp://www.domain3.tldhttp://www.domain3.tld
<Directory /path/to/mu_site>
Options -Indexes FollowSymLinks Multiviews
AllowOverride FileInfo Options
</Directory>
ErrorLog /path/logs/mu_site/error_log
TransferLog /path/logs/mu_site/access_log
</VirtualHost>
A few notes on the above. The forum vhost comes first, the "other" website second. Finally, MU comes last.
The MU one assumes you have 3 domains, two of which are mapped but do not have subdomains associated with them. YMMV.
If you have a ton of mapped domains, there's an easier way to do the above. But an average setup only has a hand full, so I used that as a reference instead.
If you have a "default" virtual host, you can make it the last one in the list.
Of course, don't forget to restart apache either. :D
If you have a "default" virtual host, you can make it the last one in the list.
just wanted to mention that Donncha recommends this setting:
Make sure the default Apache virtual host points at your WordPress MU site so it will handle unknown domains correctly. (Need info on cpanel, etc. How do you get them to respond to any domain?)
Responses (6)
Member — 4th February 2009 02:17 #
Easiest way is to have the virtual host for "forums.domain.tld" come before the main MU virtual host in your httpd.conf file.
Then the forum would have it's own path on the file system, separate from the MU file path. Plus you skip the additional overhead from the htaccess addition.
Member — 4th February 2009 14:00 #
Hey Luke,
I did this and it works great but now my mapped domains go to the forum... Any ideas on how to avoid this. According to the Domain Mapping plugin "Make sure the default Apache virtual host points at your WordPress MU site so it will handle unknown domains correctly."
Right now forums is the default since it comes first?
Member — 4th February 2009 16:15 #
That's interesting.
Here's a stripped down example of two virtual hosts within httpd.conf.
The following example would be for a server with an MU site, another website, and a forums subdomain.
A few notes on the above. The forum vhost comes first, the "other" website second. Finally, MU comes last.
The MU one assumes you have 3 domains, two of which are mapped but do not have subdomains associated with them. YMMV.
If you have a ton of mapped domains, there's an easier way to do the above. But an average setup only has a hand full, so I used that as a reference instead.
If you have a "default" virtual host, you can make it the last one in the list.
Of course, don't forget to restart apache either. :D
Member — 5th February 2009 12:33 #
just wanted to mention that Donncha recommends this setting:
http://wordpress.org/extend/plugins/wordpress-mu-domain-mapping/installation/
I have been struggling with something similar too, so please follow up this psot with suggestions if you find any solutions. thx.
Member — 5th February 2009 14:04 #
I ended up not using forums.domain.com instead I have domain.com/forums.
I did this because the solution Luke proposed
worked , but I don't want to have to add the domain into the config every time I add a new one.Also it screwed up the single sign on. But if you don't mind adding in the domains , Luke's solution does work.
Keeper of the Dark Chocolate — 5th February 2009 14:55 #
I'm actually wondering if the namechange from bbpress to forums had something to do with it.
Become a member