WPMU domain mapping
-
Hi folks! I am wondering whether any of u is using "Donncha’s Domain Mapping plugin" with a WPMU+nginx install. The set-up seems quite simple but i just don't seem to get mine working.
I have set up a CName record at domain registrar for the server domain on which WPMU is installed (say domain.com). I then get blog owners to create CName records for their new domain to point to WPMU domain.com (and also doing the same in their site's (subdomain.domain.com) backend.
Any help appreciated.
Posted 1 year ago # -
Hi Benjamin,
Yes, mate, I'm using it. Though I use an A record rather than a CName.
I'm assuming you've got wildcard redirects enabled for your primary WPMU install domain in your DNS settings - *.yourdomain.com as an A record?
Posted 1 year ago # -
Thanks Scott, that's good to hear!
Yes i do have an A record for all subdomains i.e. *.domain.com but i still can't quite get what is happening. I have tried either the A record or CName approach but instead get the mapped domain pointing to the server and not the sub-domain of interest. Btw i get no configuration errors so i probably set up the plugin fine.
How did you go about setting up yours? Are you hosting more than one domain on your server?
Cheers,
Benjamin
Posted 1 year ago # -
Hi Benjamin,
I'm using Hardy, I had the same issue initialy. One thing I noticed is when you install NGinX from the compiled binaries it's missing some key server re-writes (a much older version than source). Compiling from source solved this (just the defaults and using the latest version from the dev's repositry).
Once I did this NGinX did the rewrites properly and it worked like a charm. Flailed around for hours before I tried this, then wiped the slice and re-installed. A few hours later everything was working.
You'll also find Guv's tutorials paths will match, saving a lot of "whereis" time if you compile from source.
Of course if you've already compiled from source and you're using the latest version it might help if you shared your domain hosts available config (erase the real domain name data before posting it on the net of course!!).
Have you added the mapped domains conf as well?
Posted 1 year ago # -
Thanks again Scott!
I have NginX- 0.7.65 running. Ok the vhost available config details are enclosed as advised by The Guv for WPMU setup (http://vpsbible.com/content-management/wordpress-mu-nginx-configuration/).
Thanks,
Benjaminserver
{
listen 80;
server_name domain.com *.domain.com;
access_log /home/public_html/domain.com/log/access.log;
error_log /home/public_html/domain.com/log/error.log;
# rewrite rule - files
location ~* ^.+.(xml|jpg|jpeg|gif|png|ico|css|zip|tgz|gz|rar|bz2|doc|xls|exe|pdf|ppt|txt|tar|mid|midi|wav|b
mp|rtf|js|swf)
{
root /home/public_html/domain.com/public;
rewrite ^/files(/.*)$ /wp-content/blogs.php?file=$1 last;
expires 10d;
break;
}
# rewrite rule - sitemap
rewrite ^(.*/)?sitemap.xml wp-content/sitemap.php;
# rewrite rule - errors
location /
{
root /home/public_html/domain.com/public;
index index.php;
if (!-e $request_filename)
{
rewrite ^(.+)$ /index.php?q=$1 last;
}
}
# php requests - fast cgi
location ~ .php$
{
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME/home/public_html/domain.com/public$fastcgi_script_name;
include /usr/local/nginx/conf/fastcgi_params;
}
}Posted 1 year ago # -
hi Benjamin,
sorry for tardiness .. don't see any issues with this .. and you've tried the A record?
i have to say, really, sounds like readdressing your steps carefully.
i'm thinking of offering a service with special discounted rates for members, to look at individual server issues where there's nothing obvious .. wonder how popular that would be??? .. but very much last resort, preferable all round if we can resolve issues here, sure.
Posted 1 year ago # -
Hey Guv,
Just wanted to throw my support behind your idea. I think an option to potentially address individual server issues would be useful.
And as a follow up, if generally applicable, anything learned from such individual help should be posted for other members to gain from.
Posted 1 year ago # -
cheers Ginger,
appreciated (and I strongly agree with your second paragraph .. the whole idea of vpsBible, after all, is for precisely this service *not* to be necessary!)
please y'all, $0.02c always welcome ..
Posted 1 year ago # -
Yes Ginger I too second in supporting your idea Guv. I have learned a ton from this site and forum and will continue to garnish knowledge and become a linux server master one day but I also embrace the issue of sometimes you just need a little extra help that might be a little too high for a newb for me and embrace teh pay for tinkering and correcting individual server issues.. Sign me up guv!!
Posted 1 year ago # -
@the_guv,
Thanks! Yeah, i have tried the A records too but i am not exactly sure what/who is 'misbehaving'.
On re-reading @Scott's last comment, i am wondering whether there is a clue in his last paragraph (i.e. Have you added the mapped domains conf as well?).
Oh and i think the 'individual' help idea is certainly a good one. A couple of bucks to address some server 'headaches' and then post the solutions for members of the community is a good one (probably by way of mini tutorials or something similar).
Cheers
Posted 1 year ago # -
Benjamin!
Sorry I didn't get back here mate. Between business, family and politics I'm being run ragged.
I switched from Doncha's plugin as I needed some extra functionality (sub domains for domain mapped domains) to this one http://wpmututorials.com/simple-multi-site-plugin-e-book/ NB: That's not an affiliate link!! It's $15 and is a heck of a lot easier to configure right, while at the same time offering some nice extra features. May I suggest you consider it? Andrea and Ron are two major contributors to the WPMU support pages.
The CName mapping issue may or may not be addressed for you with this, but I'd honestly look at the A name alternative (it's IP based so breaks if IP addresses change). I know it's less convenient but it never fails me (three WPMU installs) even without the alternative plugin above.
Gov - yes. Your service sounds like a plan. Go for it! :-)
Posted 1 year ago # -
Benjamin,
Should add. If you're using an A record the conf for the mapped domain is needed. Set that up like the original (as per Guv's excellent guide) - of course the path is going to reflect that of the top level domain /home/pathvar/mytoplevelwpmu/public_html and so on as per the WPMU host directories.
Posted 1 year ago # -
Many thanks again @Scott!
Oh yes, that wonderful WPMUtutorials couple (Andrea and Ron) will certainly come handy in the near future when i get going. I have actually read abit about their domain mapping options and i am considering joining their musupport at some point.
As regards Doncha's plugin, should i suppose u have nginx conf. files for your mapped domains? Will try that and see what happens. The plugin is configured fine; the issue is in redirection to the required subdomain.
Hopefully i can resolve this soon or later.
Cheers
Posted 1 year ago # -
Hi Benjamin,
Yep - I do. A file for each domain, all pointing to the directory structure of the "master" MU site. In DNS I have the wildcard set and I include a full set of DNS records, including email (latter is optional and probably not needed if you're hosting client blogs).
Posted 1 year ago # -
Benjamin,
Try an experiment. I suspect nGinX behaves differently to Apache from WordPress' perspective. WordPress has a bit of a hard on for the Apache re-write module. I suspect it goes looking for it if the server isn't sending the information to WordPress - which if you do not have a virtual host file it is not. Again I *suspect* having a virtual host file (conf) will resolve this - no pun intended. It should *force* WordPress to act as if Apache was doing the work on re-writes.
1. Create a virtual host file named according to the domain you are trying to point as per Guv's tutorials.
2. Change the domain to the name of the domain you wish to host and make sure the paths match those your WPMU installation is on.
3. Save the file.
4. Add a symlink for it as per Guv's tutorials.
5. Restart nGinX. NB: Sometimes I've noticed a server reboot is required - keep that in mind if things fail the first time.
6. Clear your browser cache (if on Windows use the command prompt)
7. Fire up your browser and see if it works.
If you need to remove the virtual host file use the 'Nix rm command for that site in "sites available" with the location and file name - also remembering to remove the symlink you created using the same technique.
Posted 1 year ago # -
Brilliant Scott! The Virtual Host file and symlinks for the mapped domain does the trick, super! If you try this don't forget you can copy the main site's virtual host conf and only replace the 'server name' to the match the mapped domain. Keep all the other paths intact.
Posted 6 months ago #
Reply
You must log in to post.
Want HTML?
a blockquote code em strong ul ol liPlace code between backticks `codeHere`
You've got it.
